@zohodesk/dot 1.0.0-beta.183 → 1.0.0-beta.187

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 (29) hide show
  1. package/README.md +21 -1
  2. package/es/AlphabeticList/AlphabeticList.js +21 -12
  3. package/es/AlphabeticList/AlphabeticList.module.css +5 -5
  4. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +5 -5
  5. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +10 -5
  6. package/es/form/fields/ValidationMessage/ValidationMessage.js +16 -5
  7. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +17 -2
  8. package/es/form/fields/ValidationMessage/docs/ValidationMessage__default.docs.js +38 -3
  9. package/es/list/Icons/Icons.module.css +2 -1
  10. package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
  11. package/lib/AlphabeticList/AlphabeticList.js +21 -12
  12. package/lib/AlphabeticList/AlphabeticList.module.css +5 -5
  13. package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +5 -5
  14. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +10 -5
  15. package/lib/form/fields/ValidationMessage/ValidationMessage.js +18 -5
  16. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +17 -2
  17. package/lib/form/fields/ValidationMessage/docs/ValidationMessage__default.docs.js +38 -3
  18. package/lib/list/Icons/Icons.module.css +2 -1
  19. package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
  20. package/package.json +3 -3
  21. package/src/AlphabeticList/AlphabeticList.js +16 -11
  22. package/src/AlphabeticList/AlphabeticList.module.css +5 -5
  23. package/src/dropdown/ToggleDropDown/ToggleDropDown.js +45 -39
  24. package/src/form/fields/TagsMultiSelect/TagsMultiSelect.js +6 -2
  25. package/src/form/fields/ValidationMessage/ValidationMessage.js +26 -4
  26. package/src/form/fields/ValidationMessage/ValidationMessage.module.css +13 -0
  27. package/src/form/fields/ValidationMessage/docs/ValidationMessage__default.docs.js +48 -1
  28. package/src/list/Icons/Icons.module.css +3 -2
  29. package/src/version2/lookup/alertLookupCommonNew.module.css +1 -1
package/README.md CHANGED
@@ -2,11 +2,30 @@
2
2
 
3
3
  In this Library we Provide Some Basic Components to Build Your Application
4
4
 
5
+ # 1.0.0-beta.187
6
+
7
+ - AlphabeticList => vertical spaceing incremented
8
+
9
+ # 1.0.0-beta.186
10
+
11
+ - AlphabeticList => vertical spaceing incremented, dataId prop added
12
+
13
+ # 1.0.0-beta.185
14
+
15
+ - ToggleDropdown => on focusing input preventScroll disabled.
16
+ - ValidationMessage => toolip Prop Added
17
+
18
+ # 1.0.0-beta.184
19
+
20
+ - TagsMultiSelect => dataId Changes
21
+ - list/Icons => width added tto avoid jurk
22
+
5
23
  # 1.0.0-beta.183
6
24
 
7
25
  - Lookup,AlertLookup,AlertLookup2 => eventListeners Removed on UnMount
8
26
  - Drawer => getTitleChildren prop added
9
- - ToggleDropdown => on focusing input preventScroll disabled.
27
+ - ToggleDropdown => on focusing input preventScroll disabled.
28
+
10
29
  # 1.0.0-beta.182
11
30
 
12
31
  - ExternalLink, Link, AccountName, ContactName, SecondaryText/Email, SecondaryText/PhoneNumber, SecondaryText/TicketId, Subject => **customProps** prop added
@@ -14,6 +33,7 @@ In this Library we Provide Some Basic Components to Build Your Application
14
33
  # 1.0.0-beta.181
15
34
 
16
35
  - ReadUnReadIcon => icon Name fix
36
+
17
37
  # 1.0.0-beta.180
18
38
 
19
39
  - TagsMultiSelect => scrollTop Issue Solved
@@ -36,7 +36,8 @@ export default class AlphabeticList extends React.PureComponent {
36
36
  selectedCharacter,
37
37
  align,
38
38
  type,
39
- i18nKeys
39
+ i18nKeys,
40
+ dataId
40
41
  } = this.props;
41
42
  let {
42
43
  allText = 'All',
@@ -52,18 +53,19 @@ export default class AlphabeticList extends React.PureComponent {
52
53
  dataId: "navigationDiv"
53
54
  }, /*#__PURE__*/React.createElement(Box, {
54
55
  tagName: "li",
55
- className: `${style.list} ${style.title} ${selectedCharacter === 'ALL' && style.selected}`,
56
- dataId: "All_Navi"
56
+ className: `${style.list} ${style.title} ${selectedCharacter === 'ALL' ? style.selected : ''}`,
57
+ dataId: `All_${dataId}`
57
58
  }, /*#__PURE__*/React.createElement("span", {
58
59
  onClick: this.handleSelectAll,
59
- className: style.heading,
60
+ className: `${style.heading} ${style.letter}`,
60
61
  "data-title": allTitle
61
62
  }, allText)), letters.map(letter => /*#__PURE__*/React.createElement(AlphabeticListItem, {
62
63
  id: letter,
63
64
  isActive: letter === selectedCharacter,
64
65
  onClick: this.handleSelect,
65
66
  text: letter,
66
- key: letter
67
+ key: letter,
68
+ dataId: dataId
67
69
  })));
68
70
  }
69
71
 
@@ -76,12 +78,14 @@ AlphabeticList.propTypes = {
76
78
  i18nKeys: PropTypes.shape({
77
79
  allTitle: PropTypes.string,
78
80
  allText: PropTypes.string
79
- })
81
+ }),
82
+ dataId: PropTypes.string
80
83
  };
81
84
  AlphabeticList.defaultProps = {
82
85
  align: 'vertical',
83
86
  type: 'alphabetical',
84
- i18nKeys: {}
87
+ i18nKeys: {},
88
+ dataId: 'Navi'
85
89
  };
86
90
  AlphabeticList.docs = {
87
91
  componentGroup: 'Atom'
@@ -104,15 +108,18 @@ class AlphabeticListItem extends React.PureComponent {
104
108
  render() {
105
109
  let {
106
110
  isActive,
107
- text
111
+ text,
112
+ dataId
108
113
  } = this.props;
109
114
  return /*#__PURE__*/React.createElement(Box, {
110
115
  flexible: true,
111
116
  tagName: "li",
112
117
  className: `${style.list} ${isActive ? style.selected : ''}`,
113
118
  onClick: this.handleClick,
114
- dataId: `${text}_Navi`
115
- }, /*#__PURE__*/React.createElement("span", null, text));
119
+ dataId: `${text}_${dataId}`
120
+ }, /*#__PURE__*/React.createElement("span", {
121
+ className: style.letter
122
+ }, text));
116
123
  }
117
124
 
118
125
  }
@@ -121,9 +128,11 @@ AlphabeticListItem.propTypes = {
121
128
  id: PropTypes.string,
122
129
  isActive: PropTypes.bool,
123
130
  onClick: PropTypes.func,
124
- text: PropTypes.string
131
+ text: PropTypes.string,
132
+ dataId: PropTypes.string
125
133
  };
126
134
  AlphabeticListItem.defaultProps = {
127
135
  isActive: false,
128
- text: ''
136
+ text: '',
137
+ dataId: 'Navi'
129
138
  };
@@ -20,10 +20,10 @@
20
20
  [dir=rtl] .row .title {
21
21
  margin-left: var(--zd_size3);
22
22
  }
23
- .row .list > span {
23
+ .row .letter {
24
24
  padding: 0 var(--zd_size3);
25
25
  }
26
- .column .list > span {
26
+ .column .letter {
27
27
  padding: var(--zd_size3) 0;
28
28
  }
29
29
  .heading {
@@ -32,7 +32,7 @@
32
32
  }
33
33
  .list {
34
34
  font-size: var(--zd_font_size11);
35
- flex-basis: var(--zd_size10);
35
+ flex-basis: var(--zd_size12);
36
36
  color: var(--textColor);
37
37
  text-align: center;
38
38
  cursor: pointer;
@@ -40,7 +40,7 @@
40
40
  .title {
41
41
  flex-basis: var(--zd_size15);
42
42
  }
43
- .list > span {
43
+ .letter {
44
44
  text-transform: uppercase;
45
45
  display: inline-block;
46
46
  }
@@ -53,5 +53,5 @@
53
53
  }
54
54
  .title {
55
55
  font-size: var(--zd_font_size11);
56
- font-family: semibold;
56
+ font-family: var(--zd_semibold);
57
57
  }
@@ -153,11 +153,11 @@ export class ToggleDropDown extends Component {
153
153
  if (prevProps.isPopupReady !== isPopupReady) {
154
154
  setTimeout(() => {
155
155
  isPopupReady ? isSearch ? this.searchInput.focus({
156
- preventScroll: false
156
+ preventScroll: true
157
157
  }) : this.hiddenInput.focus({
158
- preventScroll: false
158
+ preventScroll: true
159
159
  }) : this.hiddenInput.focus({
160
- preventScroll: false
160
+ preventScroll: true
161
161
  });
162
162
  }, 10);
163
163
  }
@@ -366,11 +366,11 @@ export class ToggleDropDown extends Component {
366
366
  togglePopup(e, boxPosition);
367
367
  } else if (isSearch) {
368
368
  this.searchInput.focus({
369
- preventScroll: false
369
+ preventScroll: true
370
370
  });
371
371
  } else {
372
372
  this.hiddenInput.focus({
373
- preventScroll: false
373
+ preventScroll: true
374
374
  });
375
375
  }
376
376
 
@@ -190,7 +190,8 @@ export default class TagsMultiSelect extends React.Component {
190
190
  isPadding: false,
191
191
  customClass: {
192
192
  customDropBoxWrap: style.dropdown
193
- }
193
+ },
194
+ dataId: `${dataId}_dropbox`
194
195
  }, isTagListLoading ? /*#__PURE__*/React.createElement(Container, {
195
196
  align: "both",
196
197
  className: style.viewpopNew
@@ -216,7 +217,8 @@ export default class TagsMultiSelect extends React.Component {
216
217
  needTick: true,
217
218
  highlight: selectSearchIndex === index,
218
219
  getRef: this.getSelectedItemRef,
219
- isDisabled: listDisabled
220
+ isDisabled: listDisabled,
221
+ dataId: dataId
220
222
  }, isNew ? /*#__PURE__*/React.createElement(Container, {
221
223
  alignBox: "row",
222
224
  align: "vertical"
@@ -225,10 +227,12 @@ export default class TagsMultiSelect extends React.Component {
225
227
  }, i18nKeys.newTagText, ":"), /*#__PURE__*/React.createElement(Box, {
226
228
  shrink: true,
227
229
  "data-title": name,
228
- className: `${style.dotted} ${style.newTagText} `
230
+ className: `${style.dotted} ${style.newTagText} `,
231
+ dataId: `${dataId}_new_tag_text`
229
232
  }, name)) : null));
230
233
  })) : /*#__PURE__*/React.createElement(Box, {
231
- flexible: true
234
+ flexible: true,
235
+ dataId: `${dataId}_empty`
232
236
  }, /*#__PURE__*/React.createElement(Container, {
233
237
  className: style.searchEmpty
234
238
  }, /*#__PURE__*/React.createElement(CommonEmptyState, {
@@ -282,7 +286,8 @@ TagsMultiSelect.defaultProps = {
282
286
  i18nKeys: {},
283
287
  chipNeedToShow: '5',
284
288
  borderColor: 'default',
285
- needBorder: true
289
+ needBorder: true,
290
+ dataId: ''
286
291
  };
287
292
 
288
293
  if (false) {
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import style from './ValidationMessage.module.css';
4
3
  import Label from '@zohodesk/components/lib/Label/Label';
4
+ import colors from '@zohodesk/components/lib/Label/LabelColors.module.css';
5
+ import style from './ValidationMessage.module.css';
6
+ import Icon from '@zohodesk/icons/lib/Icon';
5
7
  export default class ValidationMessage extends React.Component {
6
8
  render() {
7
9
  let {
@@ -13,7 +15,8 @@ export default class ValidationMessage extends React.Component {
13
15
  size,
14
16
  dataId,
15
17
  clipped,
16
- a11y
18
+ a11y,
19
+ tooltip
17
20
  } = this.props;
18
21
  let {
19
22
  role = 'alert'
@@ -30,8 +33,15 @@ export default class ValidationMessage extends React.Component {
30
33
  size: size,
31
34
  dataId: dataId,
32
35
  clipped: clipped,
33
- title: clipped ? text : ''
34
- }));
36
+ title: clipped ? text : '',
37
+ customClass: style.lable
38
+ }), tooltip ? /*#__PURE__*/React.createElement("span", {
39
+ className: `${style.icon} ${colors[palette]}`,
40
+ "data-title": tooltip
41
+ }, /*#__PURE__*/React.createElement(Icon, {
42
+ name: "ZD-information57",
43
+ size: "14"
44
+ })) : null);
35
45
  }
36
46
 
37
47
  }
@@ -45,7 +55,8 @@ ValidationMessage.propTypes = {
45
55
  type: PropTypes.oneOf(['primary', 'secondary']),
46
56
  a11y: PropTypes.shape({
47
57
  role: PropTypes.string
48
- })
58
+ }),
59
+ tooltip: PropTypes.string
49
60
  };
50
61
  ValidationMessage.defaultProps = {
51
62
  palette: 'mandatory',
@@ -1,12 +1,27 @@
1
+ .basic{
2
+ font-size: 0;
3
+ }
4
+ .lable{
5
+ display: inline;
6
+ }
7
+ .icon{
8
+ color:var(--label_text_color);
9
+ display: inline-block;
10
+ margin: 0 var(--zd_size5);
11
+ }
1
12
  .primary {
2
13
  position: absolute;
3
14
  top: 100%;
15
+ composes:basic;
4
16
  margin-top: var(--zd_size5);
5
- }[dir=ltr] .primary {
17
+ }
18
+ [dir=ltr] .primary {
6
19
  left: 0;
7
- }[dir=rtl] .primary {
20
+ }
21
+ [dir=rtl] .primary {
8
22
  right: 0;
9
23
  }
10
24
  .secondary {
25
+ composes:basic;
11
26
  margin-top: var(--zd_size5);
12
27
  }
@@ -6,11 +6,46 @@ export default class ValidationMessage__default extends React.Component {
6
6
  }
7
7
 
8
8
  render() {
9
- return /*#__PURE__*/React.createElement(ValidationMessage, {
9
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ValidationMessage, {
10
10
  text: "validation",
11
+ palette: "default",
12
+ size: "small",
11
13
  type: "secondary",
12
- size: "small"
13
- });
14
+ tooltip: "Information"
15
+ }), /*#__PURE__*/React.createElement(ValidationMessage, {
16
+ text: "validation",
17
+ palette: "primary",
18
+ size: "small",
19
+ type: "secondary"
20
+ }), /*#__PURE__*/React.createElement(ValidationMessage, {
21
+ text: "validation",
22
+ palette: "secondary",
23
+ size: "small",
24
+ type: "secondary",
25
+ tooltip: "Information"
26
+ }), /*#__PURE__*/React.createElement(ValidationMessage, {
27
+ text: "validation",
28
+ palette: "danger",
29
+ size: "small",
30
+ type: "secondary"
31
+ }), /*#__PURE__*/React.createElement(ValidationMessage, {
32
+ text: "validation",
33
+ palette: "mandatory",
34
+ size: "small",
35
+ type: "secondary",
36
+ tooltip: "Information"
37
+ }), /*#__PURE__*/React.createElement(ValidationMessage, {
38
+ text: "validation",
39
+ palette: "dark",
40
+ size: "small",
41
+ type: "secondary"
42
+ }), /*#__PURE__*/React.createElement(ValidationMessage, {
43
+ text: "validation",
44
+ palette: "disable",
45
+ size: "small",
46
+ type: "secondary",
47
+ tooltip: "Information"
48
+ }));
14
49
  }
15
50
 
16
51
  }
@@ -4,7 +4,8 @@
4
4
  }
5
5
  .iconStyle {
6
6
  color: var(--zdt_icons_default);
7
- padding: 0 var(--zd_size9);
7
+ width: var(--zd_size33);
8
+ padding: 0 var(--zd_size8);
8
9
  cursor: pointer;
9
10
  }
10
11
  .blueHover:hover {
@@ -25,7 +25,7 @@
25
25
 
26
26
  .noteUl li {
27
27
  font-size: var(--zd_font_size12);
28
- line-height: var(--zd_size14);
28
+ /* line-height: var(--zd_size14); */
29
29
  color: var(--zdt_alertlookuop_text);
30
30
  list-style-type: disc;
31
31
  line-height: initial;
@@ -94,7 +94,8 @@ var AlphabeticList = /*#__PURE__*/function (_React$PureComponent) {
94
94
  selectedCharacter = _this$props3.selectedCharacter,
95
95
  align = _this$props3.align,
96
96
  type = _this$props3.type,
97
- i18nKeys = _this$props3.i18nKeys;
97
+ i18nKeys = _this$props3.i18nKeys,
98
+ dataId = _this$props3.dataId;
98
99
  var _i18nKeys$allText = i18nKeys.allText,
99
100
  allText = _i18nKeys$allText === void 0 ? 'All' : _i18nKeys$allText,
100
101
  _i18nKeys$allTitle = i18nKeys.allTitle,
@@ -109,11 +110,11 @@ var AlphabeticList = /*#__PURE__*/function (_React$PureComponent) {
109
110
  dataId: "navigationDiv"
110
111
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
111
112
  tagName: "li",
112
- className: "".concat(_AlphabeticListModule["default"].list, " ").concat(_AlphabeticListModule["default"].title, " ").concat(selectedCharacter === 'ALL' && _AlphabeticListModule["default"].selected),
113
- dataId: "All_Navi"
113
+ className: "".concat(_AlphabeticListModule["default"].list, " ").concat(_AlphabeticListModule["default"].title, " ").concat(selectedCharacter === 'ALL' ? _AlphabeticListModule["default"].selected : ''),
114
+ dataId: "All_".concat(dataId)
114
115
  }, /*#__PURE__*/_react["default"].createElement("span", {
115
116
  onClick: this.handleSelectAll,
116
- className: _AlphabeticListModule["default"].heading,
117
+ className: "".concat(_AlphabeticListModule["default"].heading, " ").concat(_AlphabeticListModule["default"].letter),
117
118
  "data-title": allTitle
118
119
  }, allText)), letters.map(function (letter) {
119
120
  return /*#__PURE__*/_react["default"].createElement(AlphabeticListItem, {
@@ -121,7 +122,8 @@ var AlphabeticList = /*#__PURE__*/function (_React$PureComponent) {
121
122
  isActive: letter === selectedCharacter,
122
123
  onClick: _this2.handleSelect,
123
124
  text: letter,
124
- key: letter
125
+ key: letter,
126
+ dataId: dataId
125
127
  });
126
128
  }));
127
129
  }
@@ -139,12 +141,14 @@ AlphabeticList.propTypes = {
139
141
  i18nKeys: _propTypes["default"].shape({
140
142
  allTitle: _propTypes["default"].string,
141
143
  allText: _propTypes["default"].string
142
- })
144
+ }),
145
+ dataId: _propTypes["default"].string
143
146
  };
144
147
  AlphabeticList.defaultProps = {
145
148
  align: 'vertical',
146
149
  type: 'alphabetical',
147
- i18nKeys: {}
150
+ i18nKeys: {},
151
+ dataId: 'Navi'
148
152
  };
149
153
  AlphabeticList.docs = {
150
154
  componentGroup: 'Atom'
@@ -178,14 +182,17 @@ var AlphabeticListItem = /*#__PURE__*/function (_React$PureComponent2) {
178
182
  value: function render() {
179
183
  var _this$props5 = this.props,
180
184
  isActive = _this$props5.isActive,
181
- text = _this$props5.text;
185
+ text = _this$props5.text,
186
+ dataId = _this$props5.dataId;
182
187
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
183
188
  flexible: true,
184
189
  tagName: "li",
185
190
  className: "".concat(_AlphabeticListModule["default"].list, " ").concat(isActive ? _AlphabeticListModule["default"].selected : ''),
186
191
  onClick: this.handleClick,
187
- dataId: "".concat(text, "_Navi")
188
- }, /*#__PURE__*/_react["default"].createElement("span", null, text));
192
+ dataId: "".concat(text, "_").concat(dataId)
193
+ }, /*#__PURE__*/_react["default"].createElement("span", {
194
+ className: _AlphabeticListModule["default"].letter
195
+ }, text));
189
196
  }
190
197
  }]);
191
198
 
@@ -196,9 +203,11 @@ AlphabeticListItem.propTypes = {
196
203
  id: _propTypes["default"].string,
197
204
  isActive: _propTypes["default"].bool,
198
205
  onClick: _propTypes["default"].func,
199
- text: _propTypes["default"].string
206
+ text: _propTypes["default"].string,
207
+ dataId: _propTypes["default"].string
200
208
  };
201
209
  AlphabeticListItem.defaultProps = {
202
210
  isActive: false,
203
- text: ''
211
+ text: '',
212
+ dataId: 'Navi'
204
213
  };
@@ -20,10 +20,10 @@
20
20
  [dir=rtl] .row .title {
21
21
  margin-left: var(--zd_size3);
22
22
  }
23
- .row .list > span {
23
+ .row .letter {
24
24
  padding: 0 var(--zd_size3);
25
25
  }
26
- .column .list > span {
26
+ .column .letter {
27
27
  padding: var(--zd_size3) 0;
28
28
  }
29
29
  .heading {
@@ -32,7 +32,7 @@
32
32
  }
33
33
  .list {
34
34
  font-size: var(--zd_font_size11);
35
- flex-basis: var(--zd_size10);
35
+ flex-basis: var(--zd_size12);
36
36
  color: var(--textColor);
37
37
  text-align: center;
38
38
  cursor: pointer;
@@ -40,7 +40,7 @@
40
40
  .title {
41
41
  flex-basis: var(--zd_size15);
42
42
  }
43
- .list > span {
43
+ .letter {
44
44
  text-transform: uppercase;
45
45
  display: inline-block;
46
46
  }
@@ -53,5 +53,5 @@
53
53
  }
54
54
  .title {
55
55
  font-size: var(--zd_font_size11);
56
- font-family: semibold;
56
+ font-family: var(--zd_semibold);
57
57
  }
@@ -225,11 +225,11 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
225
225
  if (prevProps.isPopupReady !== isPopupReady) {
226
226
  setTimeout(function () {
227
227
  isPopupReady ? isSearch ? _this2.searchInput.focus({
228
- preventScroll: false
228
+ preventScroll: true
229
229
  }) : _this2.hiddenInput.focus({
230
- preventScroll: false
230
+ preventScroll: true
231
231
  }) : _this2.hiddenInput.focus({
232
- preventScroll: false
232
+ preventScroll: true
233
233
  });
234
234
  }, 10);
235
235
  }
@@ -433,11 +433,11 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
433
433
  togglePopup(e, boxPosition);
434
434
  } else if (isSearch) {
435
435
  this.searchInput.focus({
436
- preventScroll: false
436
+ preventScroll: true
437
437
  });
438
438
  } else {
439
439
  this.hiddenInput.focus({
440
- preventScroll: false
440
+ preventScroll: true
441
441
  });
442
442
  }
443
443
 
@@ -244,7 +244,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
244
244
  isPadding: false,
245
245
  customClass: {
246
246
  customDropBoxWrap: _TagsMultiSelectModule["default"].dropdown
247
- }
247
+ },
248
+ dataId: "".concat(dataId, "_dropbox")
248
249
  }, isTagListLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
249
250
  align: "both",
250
251
  className: _TagsMultiSelectModule["default"].viewpopNew
@@ -268,7 +269,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
268
269
  needTick: true,
269
270
  highlight: selectSearchIndex === index,
270
271
  getRef: _this3.getSelectedItemRef,
271
- isDisabled: listDisabled
272
+ isDisabled: listDisabled,
273
+ dataId: dataId
272
274
  }, isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
273
275
  alignBox: "row",
274
276
  align: "vertical"
@@ -277,10 +279,12 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
277
279
  }, i18nKeys.newTagText, ":"), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
278
280
  shrink: true,
279
281
  "data-title": name,
280
- className: "".concat(_TagsMultiSelectModule["default"].dotted, " ").concat(_TagsMultiSelectModule["default"].newTagText, " ")
282
+ className: "".concat(_TagsMultiSelectModule["default"].dotted, " ").concat(_TagsMultiSelectModule["default"].newTagText, " "),
283
+ dataId: "".concat(dataId, "_new_tag_text")
281
284
  }, name)) : null));
282
285
  })) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
283
- flexible: true
286
+ flexible: true,
287
+ dataId: "".concat(dataId, "_empty")
284
288
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
285
289
  className: _TagsMultiSelectModule["default"].searchEmpty
286
290
  }, /*#__PURE__*/_react["default"].createElement(_CommonEmptyState["default"], {
@@ -338,7 +342,8 @@ TagsMultiSelect.defaultProps = {
338
342
  i18nKeys: {},
339
343
  chipNeedToShow: '5',
340
344
  borderColor: 'default',
341
- needBorder: true
345
+ needBorder: true,
346
+ dataId: ''
342
347
  };
343
348
 
344
349
  if (false) {
@@ -11,9 +11,13 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
+ var _Label = _interopRequireDefault(require("@zohodesk/components/lib/Label/Label"));
15
+
16
+ var _LabelColorsModule = _interopRequireDefault(require("@zohodesk/components/lib/Label/LabelColors.module.css"));
17
+
14
18
  var _ValidationMessageModule = _interopRequireDefault(require("./ValidationMessage.module.css"));
15
19
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/lib/Label/Label"));
20
+ var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
17
21
 
18
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
23
 
@@ -60,7 +64,8 @@ var ValidationMessage = /*#__PURE__*/function (_React$Component) {
60
64
  size = _this$props.size,
61
65
  dataId = _this$props.dataId,
62
66
  clipped = _this$props.clipped,
63
- a11y = _this$props.a11y;
67
+ a11y = _this$props.a11y,
68
+ tooltip = _this$props.tooltip;
64
69
  var _a11y$role = a11y.role,
65
70
  role = _a11y$role === void 0 ? 'alert' : _a11y$role;
66
71
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -75,8 +80,15 @@ var ValidationMessage = /*#__PURE__*/function (_React$Component) {
75
80
  size: size,
76
81
  dataId: dataId,
77
82
  clipped: clipped,
78
- title: clipped ? text : ''
79
- }));
83
+ title: clipped ? text : '',
84
+ customClass: _ValidationMessageModule["default"].lable
85
+ }), tooltip ? /*#__PURE__*/_react["default"].createElement("span", {
86
+ className: "".concat(_ValidationMessageModule["default"].icon, " ").concat(_LabelColorsModule["default"][palette]),
87
+ "data-title": tooltip
88
+ }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
89
+ name: "ZD-information57",
90
+ size: "14"
91
+ })) : null);
80
92
  }
81
93
  }]);
82
94
 
@@ -94,7 +106,8 @@ ValidationMessage.propTypes = {
94
106
  type: _propTypes["default"].oneOf(['primary', 'secondary']),
95
107
  a11y: _propTypes["default"].shape({
96
108
  role: _propTypes["default"].string
97
- })
109
+ }),
110
+ tooltip: _propTypes["default"].string
98
111
  };
99
112
  ValidationMessage.defaultProps = {
100
113
  palette: 'mandatory',
@@ -1,12 +1,27 @@
1
+ .basic{
2
+ font-size: 0;
3
+ }
4
+ .lable{
5
+ display: inline;
6
+ }
7
+ .icon{
8
+ color:var(--label_text_color);
9
+ display: inline-block;
10
+ margin: 0 var(--zd_size5);
11
+ }
1
12
  .primary {
2
13
  position: absolute;
3
14
  top: 100%;
15
+ composes:basic;
4
16
  margin-top: var(--zd_size5);
5
- }[dir=ltr] .primary {
17
+ }
18
+ [dir=ltr] .primary {
6
19
  left: 0;
7
- }[dir=rtl] .primary {
20
+ }
21
+ [dir=rtl] .primary {
8
22
  right: 0;
9
23
  }
10
24
  .secondary {
25
+ composes:basic;
11
26
  margin-top: var(--zd_size5);
12
27
  }
@@ -47,11 +47,46 @@ var ValidationMessage__default = /*#__PURE__*/function (_React$Component) {
47
47
  _createClass(ValidationMessage__default, [{
48
48
  key: "render",
49
49
  value: function render() {
50
- return /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
50
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
51
51
  text: "validation",
52
+ palette: "default",
53
+ size: "small",
52
54
  type: "secondary",
53
- size: "small"
54
- });
55
+ tooltip: "Information"
56
+ }), /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
57
+ text: "validation",
58
+ palette: "primary",
59
+ size: "small",
60
+ type: "secondary"
61
+ }), /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
62
+ text: "validation",
63
+ palette: "secondary",
64
+ size: "small",
65
+ type: "secondary",
66
+ tooltip: "Information"
67
+ }), /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
68
+ text: "validation",
69
+ palette: "danger",
70
+ size: "small",
71
+ type: "secondary"
72
+ }), /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
73
+ text: "validation",
74
+ palette: "mandatory",
75
+ size: "small",
76
+ type: "secondary",
77
+ tooltip: "Information"
78
+ }), /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
79
+ text: "validation",
80
+ palette: "dark",
81
+ size: "small",
82
+ type: "secondary"
83
+ }), /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], {
84
+ text: "validation",
85
+ palette: "disable",
86
+ size: "small",
87
+ type: "secondary",
88
+ tooltip: "Information"
89
+ }));
55
90
  }
56
91
  }]);
57
92
 
@@ -4,7 +4,8 @@
4
4
  }
5
5
  .iconStyle {
6
6
  color: var(--zdt_icons_default);
7
- padding: 0 var(--zd_size9);
7
+ width: var(--zd_size33);
8
+ padding: 0 var(--zd_size8);
8
9
  cursor: pointer;
9
10
  }
10
11
  .blueHover:hover {
@@ -25,7 +25,7 @@
25
25
 
26
26
  .noteUl li {
27
27
  font-size: var(--zd_font_size12);
28
- line-height: var(--zd_size14);
28
+ /* line-height: var(--zd_size14); */
29
29
  color: var(--zdt_alertlookuop_text);
30
30
  list-style-type: disc;
31
31
  line-height: initial;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.0.0-beta.183",
3
+ "version": "1.0.0-beta.187",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",
@@ -32,7 +32,7 @@
32
32
  "velocity-react": "^1.4.3",
33
33
  "@zohodesk/variables": "1.0.0-beta.23",
34
34
  "@zohodesk/i18n": "^1.0.0-beta.7",
35
- "@zohodesk/components": "1.0.0-alpha-204",
35
+ "@zohodesk/components": "1.0.0-alpha-205",
36
36
  "@zohodesk/icons": "1.0.0-beta.85",
37
37
  "@zohodesk/svg": "1.0.0-beta.34",
38
38
  "@zohodesk/virtualizer": "1.0.3",
@@ -42,7 +42,7 @@
42
42
  "velocity-react": "^1.4.3",
43
43
  "@zohodesk/variables": "^1.0.0-beta.23",
44
44
  "@zohodesk/i18n": "^1.0.0-beta.7",
45
- "@zohodesk/components": "1.0.0-alpha-204",
45
+ "@zohodesk/components": "1.0.0-alpha-205",
46
46
  "@zohodesk/icons": "^1.0.0-beta.85",
47
47
  "@zohodesk/svg": "^1.0.0-beta.34"
48
48
  },
@@ -56,7 +56,7 @@ export default class AlphabeticList extends React.PureComponent {
56
56
  }
57
57
 
58
58
  render() {
59
- let { selectedCharacter, align, type, i18nKeys } = this.props;
59
+ let { selectedCharacter, align, type, i18nKeys, dataId } = this.props;
60
60
  let { allText = 'All', allTitle = 'All' } = i18nKeys;
61
61
  let alignType = align === 'vertical' ? style.column : style.row;
62
62
  let letters =
@@ -79,13 +79,13 @@ export default class AlphabeticList extends React.PureComponent {
79
79
  <Box
80
80
  tagName='li'
81
81
  className={`${style.list} ${style.title} ${
82
- selectedCharacter === 'ALL' && style.selected
82
+ selectedCharacter === 'ALL' ? style.selected : ''
83
83
  }`}
84
- dataId='All_Navi'
84
+ dataId={`All_${dataId}`}
85
85
  >
86
86
  <span
87
87
  onClick={this.handleSelectAll}
88
- className={style.heading}
88
+ className={`${style.heading} ${style.letter}`}
89
89
  data-title={allTitle}
90
90
  >
91
91
  {allText}
@@ -98,6 +98,7 @@ export default class AlphabeticList extends React.PureComponent {
98
98
  onClick={this.handleSelect}
99
99
  text={letter}
100
100
  key={letter}
101
+ dataId={dataId}
101
102
  />
102
103
  ))}
103
104
  </Container>
@@ -118,13 +119,15 @@ AlphabeticList.propTypes = {
118
119
  i18nKeys: PropTypes.shape({
119
120
  allTitle: PropTypes.string,
120
121
  allText: PropTypes.string
121
- })
122
+ }),
123
+ dataId: PropTypes.string
122
124
  };
123
125
 
124
126
  AlphabeticList.defaultProps = {
125
127
  align: 'vertical',
126
128
  type: 'alphabetical',
127
- i18nKeys: {}
129
+ i18nKeys: {},
130
+ dataId: 'Navi'
128
131
  };
129
132
 
130
133
  AlphabeticList.docs = {
@@ -143,16 +146,16 @@ class AlphabeticListItem extends React.PureComponent {
143
146
  }
144
147
 
145
148
  render() {
146
- let { isActive, text } = this.props;
149
+ let { isActive, text, dataId } = this.props;
147
150
  return (
148
151
  <Box
149
152
  flexible
150
153
  tagName='li'
151
154
  className={`${style.list} ${isActive ? style.selected : ''}`}
152
155
  onClick={this.handleClick}
153
- dataId={`${text}_Navi`}
156
+ dataId={`${text}_${dataId}`}
154
157
  >
155
- <span>{text}</span>
158
+ <span className={style.letter}>{text}</span>
156
159
  </Box>
157
160
  );
158
161
  }
@@ -162,10 +165,12 @@ AlphabeticListItem.propTypes = {
162
165
  id: PropTypes.string,
163
166
  isActive: PropTypes.bool,
164
167
  onClick: PropTypes.func,
165
- text: PropTypes.string
168
+ text: PropTypes.string,
169
+ dataId: PropTypes.string
166
170
  };
167
171
 
168
172
  AlphabeticListItem.defaultProps = {
169
173
  isActive: false,
170
- text: ''
174
+ text: '',
175
+ dataId: 'Navi'
171
176
  };
@@ -17,10 +17,10 @@
17
17
  .row .title {
18
18
  margin-right: var(--zd_size3);
19
19
  }
20
- .row .list > span {
20
+ .row .letter {
21
21
  padding: 0 var(--zd_size3);
22
22
  }
23
- .column .list > span {
23
+ .column .letter {
24
24
  padding: var(--zd_size3) 0;
25
25
  }
26
26
  .heading {
@@ -30,14 +30,14 @@
30
30
  .list {
31
31
  font-size: var(--zd_font_size11);
32
32
  text-align: center;
33
- flex-basis: var(--zd_size10);
33
+ flex-basis: var(--zd_size12);
34
34
  cursor: pointer;
35
35
  color: var(--textColor);
36
36
  }
37
37
  .title {
38
38
  flex-basis: var(--zd_size15);
39
39
  }
40
- .list > span {
40
+ .letter {
41
41
  text-transform: uppercase;
42
42
  display: inline-block;
43
43
  }
@@ -50,5 +50,5 @@
50
50
  }
51
51
  .title {
52
52
  font-size: var(--zd_font_size11);
53
- font-family: semibold;
53
+ font-family: var(--zd_semibold);
54
54
  }
@@ -65,7 +65,13 @@ export class ToggleDropDown extends Component {
65
65
  }
66
66
 
67
67
  handleTogglePopup(e) {
68
- const { togglePopup, boxPosition, onSelectLabel, isPopupOpen, removeClose } = this.props;
68
+ const {
69
+ togglePopup,
70
+ boxPosition,
71
+ onSelectLabel,
72
+ isPopupOpen,
73
+ removeClose
74
+ } = this.props;
69
75
  removeClose && removeClose(e);
70
76
  !isPopupOpen && onSelectLabel && onSelectLabel(e);
71
77
  togglePopup(e, boxPosition);
@@ -124,9 +130,9 @@ export class ToggleDropDown extends Component {
124
130
  setTimeout(() => {
125
131
  isPopupReady
126
132
  ? isSearch
127
- ? this.searchInput.focus({preventScroll:false})
128
- : this.hiddenInput.focus({preventScroll:false})
129
- : this.hiddenInput.focus({preventScroll:false});
133
+ ? this.searchInput.focus({ preventScroll: true })
134
+ : this.hiddenInput.focus({ preventScroll: true })
135
+ : this.hiddenInput.focus({ preventScroll: true });
130
136
  }, 10);
131
137
  }
132
138
  const optionsArr = this.getOptionsArray();
@@ -162,22 +168,17 @@ export class ToggleDropDown extends Component {
162
168
  }
163
169
 
164
170
  handleFilterSuggestions(searchValue) {
165
- const {
166
- options,
167
- keyName,
168
- isGroupDropDown,
169
- groupOptionsKey,
170
- groupNameKey
171
- } = this.props;
171
+ const { options, keyName, isGroupDropDown, groupOptionsKey, groupNameKey } =
172
+ this.props;
172
173
  searchValue = searchValue.trim().toLowerCase();
173
174
  let result = [];
174
175
  if (isGroupDropDown) {
175
176
  const filteredGroups = [];
176
- options.map((group) => {
177
+ options.map(group => {
177
178
  const { needDivider } = group;
178
179
  const name = group[groupNameKey];
179
180
  const groupOptions = group[groupOptionsKey];
180
- const datas = groupOptions.filter((list) => {
181
+ const datas = groupOptions.filter(list => {
181
182
  const value = list[keyName];
182
183
  return value.toLowerCase().includes(searchValue);
183
184
  });
@@ -200,7 +201,7 @@ export class ToggleDropDown extends Component {
200
201
  if (filteredOptions.length) {
201
202
  // to avoid more than one dividers consecutively comes as one by one
202
203
  let needDividerCount = 0;
203
- const orderedOptions = filteredOptions.filter((item) => {
204
+ const orderedOptions = filteredOptions.filter(item => {
204
205
  if (item.needDivider && needDividerCount === 0) {
205
206
  needDividerCount++;
206
207
  return true;
@@ -240,7 +241,7 @@ export class ToggleDropDown extends Component {
240
241
  Array.prototype.push.apply(optionsArr, groupOptions);
241
242
  }
242
243
  } else {
243
- optionsArr = options.filter((item) => !item.needDivider);
244
+ optionsArr = options.filter(item => !item.needDivider);
244
245
  }
245
246
  return optionsArr;
246
247
  }
@@ -263,7 +264,11 @@ export class ToggleDropDown extends Component {
263
264
  preventPopupClose,
264
265
  isSearch
265
266
  } = this.props;
266
- if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
267
+ if (
268
+ isPopupReady &&
269
+ (keyCode === 38 || keyCode === 40) &&
270
+ e.preventDefault
271
+ ) {
267
272
  e.preventDefault(); //prevent body scroll
268
273
  }
269
274
  if (isPopupReady) {
@@ -294,14 +299,12 @@ export class ToggleDropDown extends Component {
294
299
  case 13:
295
300
  const selectedId = optionsArr[selectedIndex][idName] || '';
296
301
  onClick && onClick(selectedId, optionsArr[selectedIndex]);
297
- if(!preventPopupClose) {
302
+ if (!preventPopupClose) {
298
303
  togglePopup(e, boxPosition);
299
- }
300
- else if(isSearch) {
301
- this.searchInput.focus({preventScroll:false});
302
- }
303
- else {
304
- this.hiddenInput.focus({preventScroll:false});
304
+ } else if (isSearch) {
305
+ this.searchInput.focus({ preventScroll: true });
306
+ } else {
307
+ this.hiddenInput.focus({ preventScroll: true });
305
308
  }
306
309
  break;
307
310
  }
@@ -314,7 +317,7 @@ export class ToggleDropDown extends Component {
314
317
 
315
318
  getSelectedIndex(optionsArr) {
316
319
  const { selectedId, idName } = this.props;
317
- if(selectedId) {
320
+ if (selectedId) {
318
321
  for (let i = 0; i < optionsArr.length; i++) {
319
322
  const indexId = optionsArr[i][idName];
320
323
  if (selectedId === indexId) {
@@ -324,11 +327,10 @@ export class ToggleDropDown extends Component {
324
327
  break;
325
328
  }
326
329
  }
327
- }
328
- else {
330
+ } else {
329
331
  this.setState({
330
332
  selectedIndex: -1
331
- })
333
+ });
332
334
  }
333
335
  }
334
336
 
@@ -439,7 +441,13 @@ export class ToggleDropDown extends Component {
439
441
  getFooter,
440
442
  customProps
441
443
  } = this.props;
442
- let {ToggleDropDownProps={},DropBoxProps={},TextBoxIconProps={},ListItemWithIconProps={},ListItemProps={}}=customProps;
444
+ let {
445
+ ToggleDropDownProps = {},
446
+ DropBoxProps = {},
447
+ TextBoxIconProps = {},
448
+ ListItemWithIconProps = {},
449
+ ListItemProps = {}
450
+ } = customProps;
443
451
  const isPopupOpen = needExternalPopupState
444
452
  ? isPopupActive && isOpen
445
453
  : isOpen;
@@ -453,10 +461,10 @@ export class ToggleDropDown extends Component {
453
461
  isDisabled
454
462
  ? CssProvider('isDisable')
455
463
  : isReadOnly || !isEditable
456
- ? style.cursorDefault
457
- : !showOnHover
458
- ? `${style.cursor} ${hoverStyle ? hoverStyle : ''}`
459
- : `${hoverStyle ? hoverStyle : ''} ${style.cursorDefault}`
464
+ ? style.cursorDefault
465
+ : !showOnHover
466
+ ? `${style.cursor} ${hoverStyle ? hoverStyle : ''}`
467
+ : `${hoverStyle ? hoverStyle : ''} ${style.cursorDefault}`
460
468
  }`;
461
469
  let listIndex = -1;
462
470
  const ariaTitleId = this.getAriaId();
@@ -637,7 +645,7 @@ export class ToggleDropDown extends Component {
637
645
  options && options.length != 0 ? (
638
646
  isGroupDropDown ? (
639
647
  <Fragment>
640
- {options.map((group) => {
648
+ {options.map(group => {
641
649
  const groupName = group[groupNameKey];
642
650
  const groupOptions = group[groupOptionsKey];
643
651
  const { needDivider } = group;
@@ -658,7 +666,7 @@ export class ToggleDropDown extends Component {
658
666
  </div>
659
667
  )}
660
668
  {groupOptions &&
661
- groupOptions.map((item) => {
669
+ groupOptions.map(item => {
662
670
  const {
663
671
  iconName,
664
672
  iconSize,
@@ -818,9 +826,7 @@ export class ToggleDropDown extends Component {
818
826
  </div>
819
827
  )}
820
828
  </Box>
821
- {getFooter ? (
822
- <div>{getFooter()}</div>
823
- ) : null}
829
+ {getFooter ? <div>{getFooter()}</div> : null}
824
830
  </Fragment>
825
831
  </DropBox>
826
832
  ) : null}
@@ -849,7 +855,7 @@ ToggleDropDown.defaultProps = {
849
855
  isNeedEffect: true,
850
856
  hoverType: 'default',
851
857
  needExternalPopupState: false,
852
- customProps:{},
858
+ customProps: {},
853
859
  preventPopupClose: false
854
860
  };
855
861
 
@@ -926,7 +932,7 @@ ToggleDropDown.propTypes = {
926
932
  onDropDownOpen: PropTypes.func,
927
933
  onDropDownClose: PropTypes.func,
928
934
  getFooter: PropTypes.func,
929
- customProps:PropTypes.shape({
935
+ customProps: PropTypes.shape({
930
936
  ToggleDropDownProps: PropTypes.object,
931
937
  DropBoxProps: PropTypes.object,
932
938
  TextBoxIconProps: PropTypes.object,
@@ -203,6 +203,7 @@ export default class TagsMultiSelect extends React.Component {
203
203
  customClass={{
204
204
  customDropBoxWrap: style.dropdown
205
205
  }}
206
+ dataId={`${dataId}_dropbox`}
206
207
  >
207
208
  {isTagListLoading ? (
208
209
  <Container align='both' className={style.viewpopNew}>
@@ -236,6 +237,7 @@ export default class TagsMultiSelect extends React.Component {
236
237
  highlight={selectSearchIndex === index}
237
238
  getRef={this.getSelectedItemRef}
238
239
  isDisabled={listDisabled}
240
+ dataId={dataId}
239
241
  >
240
242
  {isNew ? (
241
243
  <Container alignBox='row' align='vertical'>
@@ -246,6 +248,7 @@ export default class TagsMultiSelect extends React.Component {
246
248
  shrink
247
249
  data-title={name}
248
250
  className={`${style.dotted} ${style.newTagText} `}
251
+ dataId={`${dataId}_new_tag_text`}
249
252
  >
250
253
  {name}
251
254
  </Box>
@@ -257,7 +260,7 @@ export default class TagsMultiSelect extends React.Component {
257
260
  })}
258
261
  </Box>
259
262
  ) : (
260
- <Box flexible>
263
+ <Box flexible dataId={`${dataId}_empty`}>
261
264
  <Container className={style.searchEmpty}>
262
265
  <CommonEmptyState
263
266
  title={i18nKeys.emptyTitleText}
@@ -320,7 +323,8 @@ TagsMultiSelect.defaultProps = {
320
323
  i18nKeys: {},
321
324
  chipNeedToShow: '5',
322
325
  borderColor: 'default',
323
- needBorder: true
326
+ needBorder: true,
327
+ dataId:''
324
328
  };
325
329
 
326
330
  if (__DOCS__) {
@@ -1,12 +1,24 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import style from './ValidationMessage.module.css';
4
3
  import Label from '@zohodesk/components/lib/Label/Label';
4
+ import colors from '@zohodesk/components/lib/Label/LabelColors.module.css';
5
+ import style from './ValidationMessage.module.css';
6
+ import Icon from '@zohodesk/icons/lib/Icon';
5
7
 
6
8
  export default class ValidationMessage extends React.Component {
7
9
  render() {
8
- let { palette, text, htmlFor, onClick, type, size, dataId, clipped, a11y } =
9
- this.props;
10
+ let {
11
+ palette,
12
+ text,
13
+ htmlFor,
14
+ onClick,
15
+ type,
16
+ size,
17
+ dataId,
18
+ clipped,
19
+ a11y,
20
+ tooltip
21
+ } = this.props;
10
22
  let { role = 'alert' } = a11y;
11
23
  return (
12
24
  <div
@@ -23,7 +35,16 @@ export default class ValidationMessage extends React.Component {
23
35
  dataId={dataId}
24
36
  clipped={clipped}
25
37
  title={clipped ? text : ''}
38
+ customClass={style.lable}
26
39
  />
40
+ {tooltip ? (
41
+ <span
42
+ className={`${style.icon} ${colors[palette]}`}
43
+ data-title={tooltip}
44
+ >
45
+ <Icon name='ZD-information57' size='14' />
46
+ </span>
47
+ ) : null}
27
48
  </div>
28
49
  );
29
50
  }
@@ -38,7 +59,8 @@ ValidationMessage.propTypes = {
38
59
  type: PropTypes.oneOf(['primary', 'secondary']),
39
60
  a11y: PropTypes.shape({
40
61
  role: PropTypes.string
41
- })
62
+ }),
63
+ tooltip: PropTypes.string
42
64
  };
43
65
  ValidationMessage.defaultProps = {
44
66
  palette: 'mandatory',
@@ -1,9 +1,22 @@
1
+ .basic{
2
+ font-size: 0;
3
+ }
4
+ .lable{
5
+ display: inline;
6
+ }
7
+ .icon{
8
+ margin: 0 var(--zd_size5);
9
+ color:var(--label_text_color);
10
+ display: inline-block;
11
+ }
1
12
  .primary {
2
13
  position: absolute;
3
14
  top: 100%;
4
15
  left: 0;
5
16
  margin-top: var(--zd_size5);
17
+ composes:basic;
6
18
  }
7
19
  .secondary {
8
20
  margin-top: var(--zd_size5);
21
+ composes:basic;
9
22
  }
@@ -7,7 +7,54 @@ export default class ValidationMessage__default extends React.Component {
7
7
 
8
8
  render() {
9
9
  return (
10
- <ValidationMessage text='validation' type='secondary' size='small' />
10
+ <div>
11
+ <ValidationMessage
12
+ text='validation'
13
+ palette='default'
14
+ size='small'
15
+ type='secondary'
16
+ tooltip='Information'
17
+ />
18
+ <ValidationMessage
19
+ text='validation'
20
+ palette='primary'
21
+ size='small'
22
+ type='secondary'
23
+ />
24
+ <ValidationMessage
25
+ text='validation'
26
+ palette='secondary'
27
+ size='small'
28
+ type='secondary'
29
+ tooltip='Information'
30
+ />
31
+ <ValidationMessage
32
+ text='validation'
33
+ palette='danger'
34
+ size='small'
35
+ type='secondary'
36
+ />
37
+ <ValidationMessage
38
+ text='validation'
39
+ palette='mandatory'
40
+ size='small'
41
+ type='secondary'
42
+ tooltip='Information'
43
+ />
44
+ <ValidationMessage
45
+ text='validation'
46
+ palette='dark'
47
+ size='small'
48
+ type='secondary'
49
+ />
50
+ <ValidationMessage
51
+ text='validation'
52
+ palette='disable'
53
+ size='small'
54
+ type='secondary'
55
+ tooltip='Information'
56
+ />
57
+ </div>
11
58
  );
12
59
  }
13
60
  }
@@ -3,9 +3,10 @@
3
3
  composes: inlineFlex from '../listCommon.module.css';
4
4
  }
5
5
  .iconStyle {
6
- padding: 0 var(--zd_size9);
7
- cursor: pointer;
8
6
  color: var(--zdt_icons_default);
7
+ padding: 0 var(--zd_size8);
8
+ width: var(--zd_size33);
9
+ cursor: pointer;
9
10
  }
10
11
  .blueHover:hover {
11
12
  color: var(--zdt_icons_hover_blue);
@@ -18,7 +18,7 @@
18
18
 
19
19
  .noteUl li {
20
20
  font-size: var(--zd_font_size12);
21
- line-height: var(--zd_size14);
21
+ /* line-height: var(--zd_size14); */
22
22
  color: var(--zdt_alertlookuop_text);
23
23
  margin-bottom: var(--zd_size15);
24
24
  list-style-type: disc;