@zohodesk/dot 1.9.0 → 1.9.2

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 (78) hide show
  1. package/README.md +12 -1
  2. package/es/form/fields/CheckBoxField/CheckBoxField.js +17 -8
  3. package/es/form/fields/CheckBoxField/__tests__/__snapshots__/CheckBoxField.spec.js.snap +21 -18
  4. package/es/form/fields/CurrencyField/CurrencyField.js +10 -4
  5. package/es/form/fields/DateField/DateField.js +17 -7
  6. package/es/form/fields/MultiSelectField/MultiSelectField.js +13 -6
  7. package/es/form/fields/RadioField/RadioField.js +15 -5
  8. package/es/form/fields/SelectField/SelectField.js +17 -7
  9. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +16 -7
  10. package/es/form/fields/TextBoxField/TextBoxField.js +16 -6
  11. package/es/form/fields/TextEditorField/TextEditorField.js +10 -4
  12. package/es/form/fields/TextareaField/TextareaField.js +15 -5
  13. package/es/list/DepartmentDropDown/__tests__/__snapshots__/DepartmentDropDown.spec.js.snap +1 -1
  14. package/es/list/SecondaryText/AccountName.js +23 -8
  15. package/es/list/SecondaryText/ContactName.js +18 -6
  16. package/es/list/SecondaryText/DepartmentText.js +13 -6
  17. package/es/list/SecondaryText/Email.js +19 -7
  18. package/es/list/SecondaryText/PhoneNumber.js +19 -7
  19. package/es/list/SecondaryText/PriorityText.js +13 -6
  20. package/es/list/SecondaryText/SecondaryText.js +17 -8
  21. package/es/list/SecondaryText/SecondaryText.module.css +40 -24
  22. package/es/list/SecondaryText/StatusText.js +13 -6
  23. package/es/list/SecondaryText/TicketId.js +8 -2
  24. package/es/list/SecondaryText/Website.js +16 -5
  25. package/es/list/SecondaryText/__tests__/__snapshots__/AccountName.spec.js.snap +1 -1
  26. package/es/list/SecondaryText/__tests__/__snapshots__/ContactName.spec.js.snap +1 -1
  27. package/es/list/SecondaryText/__tests__/__snapshots__/DepartmentText.spec.js.snap +1 -1
  28. package/es/list/SecondaryText/__tests__/__snapshots__/Email.spec.js.snap +1 -1
  29. package/es/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
  30. package/es/list/SecondaryText/__tests__/__snapshots__/PriorityText.spec.js.snap +1 -1
  31. package/es/list/SecondaryText/__tests__/__snapshots__/SecondaryText.spec.js.snap +1 -1
  32. package/es/list/SecondaryText/__tests__/__snapshots__/StatusText.spec.js.snap +1 -1
  33. package/es/list/SecondaryText/__tests__/__snapshots__/Website.spec.js.snap +6 -2
  34. package/es/list/SecondaryText/props/defaultProps.js +18 -0
  35. package/es/list/SecondaryText/props/propTypes.js +21 -0
  36. package/es/list/Subject/Subject.js +28 -12
  37. package/es/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +14 -14
  38. package/es/list/Subject/props/defaultProps.js +3 -1
  39. package/es/list/Subject/props/propTypes.js +5 -1
  40. package/lib/form/fields/CheckBoxField/CheckBoxField.js +17 -8
  41. package/lib/form/fields/CheckBoxField/__tests__/__snapshots__/CheckBoxField.spec.js.snap +21 -18
  42. package/lib/form/fields/CurrencyField/CurrencyField.js +10 -4
  43. package/lib/form/fields/DateField/DateField.js +17 -8
  44. package/lib/form/fields/MultiSelectField/MultiSelectField.js +13 -6
  45. package/lib/form/fields/RadioField/RadioField.js +15 -5
  46. package/lib/form/fields/SelectField/SelectField.js +17 -8
  47. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +16 -7
  48. package/lib/form/fields/TextBoxField/TextBoxField.js +16 -7
  49. package/lib/form/fields/TextEditorField/TextEditorField.js +10 -4
  50. package/lib/form/fields/TextareaField/TextareaField.js +15 -5
  51. package/lib/list/DepartmentDropDown/__tests__/__snapshots__/DepartmentDropDown.spec.js.snap +1 -1
  52. package/lib/list/SecondaryText/AccountName.js +27 -8
  53. package/lib/list/SecondaryText/ContactName.js +21 -6
  54. package/lib/list/SecondaryText/DepartmentText.js +15 -6
  55. package/lib/list/SecondaryText/Email.js +22 -7
  56. package/lib/list/SecondaryText/PhoneNumber.js +22 -7
  57. package/lib/list/SecondaryText/PriorityText.js +15 -6
  58. package/lib/list/SecondaryText/SecondaryText.js +26 -8
  59. package/lib/list/SecondaryText/SecondaryText.module.css +40 -24
  60. package/lib/list/SecondaryText/StatusText.js +15 -6
  61. package/lib/list/SecondaryText/TicketId.js +10 -2
  62. package/lib/list/SecondaryText/Website.js +18 -5
  63. package/lib/list/SecondaryText/__tests__/__snapshots__/AccountName.spec.js.snap +1 -1
  64. package/lib/list/SecondaryText/__tests__/__snapshots__/ContactName.spec.js.snap +1 -1
  65. package/lib/list/SecondaryText/__tests__/__snapshots__/DepartmentText.spec.js.snap +1 -1
  66. package/lib/list/SecondaryText/__tests__/__snapshots__/Email.spec.js.snap +1 -1
  67. package/lib/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
  68. package/lib/list/SecondaryText/__tests__/__snapshots__/PriorityText.spec.js.snap +1 -1
  69. package/lib/list/SecondaryText/__tests__/__snapshots__/SecondaryText.spec.js.snap +1 -1
  70. package/lib/list/SecondaryText/__tests__/__snapshots__/StatusText.spec.js.snap +1 -1
  71. package/lib/list/SecondaryText/__tests__/__snapshots__/Website.spec.js.snap +6 -2
  72. package/lib/list/SecondaryText/props/defaultProps.js +18 -0
  73. package/lib/list/SecondaryText/props/propTypes.js +22 -0
  74. package/lib/list/Subject/Subject.js +40 -13
  75. package/lib/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +14 -14
  76. package/lib/list/Subject/props/defaultProps.js +3 -1
  77. package/lib/list/Subject/props/propTypes.js +6 -1
  78. package/package.json +7 -7
@@ -1,4 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
+ import { propTypes as typographyProps } from '@zohodesk/components/es/Typography/props/propTypes';
2
3
  export const AccountName_propTypes = {
3
4
  className: PropTypes.string,
4
5
  dataId: PropTypes.string,
@@ -14,6 +15,8 @@ export const AccountName_propTypes = {
14
15
  secondaryAccountHref: PropTypes.string,
15
16
  secondaryAccountClick: PropTypes.func,
16
17
  secondaryAccountText: PropTypes.string,
18
+ isHighlighted: PropTypes.bool,
19
+ highlightData: typographyProps.$ui_highlightConfig,
17
20
  customProps: PropTypes.shape({
18
21
  LinkProps: PropTypes.object,
19
22
  TextProps: PropTypes.object,
@@ -42,6 +45,8 @@ export const ContactName_propTypes = {
42
45
  }),
43
46
  paidTitle: PropTypes.string
44
47
  }),
48
+ isHighlighted: PropTypes.bool,
49
+ highlightData: typographyProps.$ui_highlightConfig,
45
50
  customProps: PropTypes.shape({
46
51
  LinkProps: PropTypes.object,
47
52
  TextProps: PropTypes.object
@@ -51,6 +56,8 @@ export const DepartmentText_propTypes = {
51
56
  className: PropTypes.string,
52
57
  dataId: PropTypes.string,
53
58
  dataTitle: PropTypes.string,
59
+ isHighlighted: PropTypes.bool,
60
+ highlightData: typographyProps.$ui_highlightConfig,
54
61
  text: PropTypes.string
55
62
  };
56
63
  export const Email_propTypes = {
@@ -63,6 +70,8 @@ export const Email_propTypes = {
63
70
  title: PropTypes.string,
64
71
  urlData: PropTypes.object,
65
72
  urlName: PropTypes.string,
73
+ isHighlighted: PropTypes.bool,
74
+ highlightData: typographyProps.$ui_highlightConfig,
66
75
  customProps: PropTypes.shape({
67
76
  LinkProps: PropTypes.object,
68
77
  TextProps: PropTypes.object
@@ -85,6 +94,8 @@ export const PhoneNumber_propTypes = {
85
94
  title: PropTypes.string,
86
95
  urlData: PropTypes.object,
87
96
  urlName: PropTypes.string,
97
+ isHighlighted: PropTypes.bool,
98
+ highlightData: typographyProps.$ui_highlightConfig,
88
99
  customProps: PropTypes.shape({
89
100
  LinkProps: PropTypes.object,
90
101
  TextProps: PropTypes.object
@@ -95,6 +106,8 @@ export const PriorityText_propTypes = {
95
106
  color: PropTypes.oneOf(['red', 'green', 'gray', 'orange']),
96
107
  dataId: PropTypes.string,
97
108
  dataTitle: PropTypes.string,
109
+ isHighlighted: PropTypes.bool,
110
+ highlightData: typographyProps.$ui_highlightConfig,
98
111
  text: PropTypes.string
99
112
  };
100
113
  export const SecondaryText_propTypes = {
@@ -103,6 +116,8 @@ export const SecondaryText_propTypes = {
103
116
  dataTitle: PropTypes.string,
104
117
  onClick: PropTypes.func,
105
118
  text: PropTypes.string,
119
+ isHighlighted: PropTypes.bool,
120
+ highlightData: typographyProps.$ui_highlightConfig,
106
121
  customProps: PropTypes.shape({
107
122
  SecondaryTextProps: PropTypes.object
108
123
  })
@@ -113,6 +128,8 @@ export const StatusText_propTypes = {
113
128
  dataId: PropTypes.string,
114
129
  dataTitle: PropTypes.string,
115
130
  fontWeight: PropTypes.oneOf(['regular', 'semibold', 'bold']),
131
+ isHighlighted: PropTypes.bool,
132
+ highlightData: typographyProps.$ui_highlightConfig,
116
133
  text: PropTypes.string
117
134
  };
118
135
  export const TicketId_propTypes = {
@@ -126,6 +143,8 @@ export const TicketId_propTypes = {
126
143
  url: PropTypes.string,
127
144
  urlData: PropTypes.string,
128
145
  urlName: PropTypes.string,
146
+ isHighlighted: PropTypes.bool,
147
+ highlightData: typographyProps.$ui_highlightConfig,
129
148
  customProps: PropTypes.shape({
130
149
  TicketIdProps: PropTypes.object,
131
150
  LinkProps: PropTypes.object
@@ -138,5 +157,7 @@ export const Website_propTypes = {
138
157
  isLink: PropTypes.bool,
139
158
  target: PropTypes.string,
140
159
  text: PropTypes.string,
160
+ isHighlighted: PropTypes.bool,
161
+ highlightData: typographyProps.$ui_highlightConfig,
141
162
  title: PropTypes.string
142
163
  };
@@ -1,6 +1,8 @@
1
1
  import React, { Component } from 'react';
2
2
  import { defaultProps } from "./props/defaultProps";
3
3
  import { propTypes } from "./props/propTypes";
4
+ import Typography from '@zohodesk/components/es/Typography/Typography';
5
+ import { DUMMY_OBJECT } from '@zohodesk/components/es/utils/Common';
4
6
  import Link from "../../Link/Link";
5
7
  import { whiteSpaceClassMapping } from '@zohodesk/components/es/utils/cssUtils';
6
8
  import style from "./Subject.module.css";
@@ -24,30 +26,44 @@ export default class Subject extends Component {
24
26
  isDotted,
25
27
  children,
26
28
  customProps,
27
- whiteSpace
29
+ whiteSpace,
30
+ isHighlighted,
31
+ highlightData
28
32
  } = this.props;
29
33
  let {
30
34
  LinkProps = {},
31
35
  TextProps = {}
32
36
  } = customProps;
37
+ let tagAttributesText = { ...TextProps,
38
+ 'data-title-wrap': whiteSpace
39
+ };
40
+ let linkTagAttributes = {
41
+ 'data-title-wrap': whiteSpace
42
+ };
33
43
  return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
34
44
  urlName: urlName,
35
45
  href: href,
36
46
  urlData: urlData,
37
47
  onClick: onClick,
38
- className: `${style.subject} ${isDotted ? style.dotted : ''} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style[`font_${fontWeight}`]} ${style.cursorPointer}`,
39
- dataId: dataId,
40
- title: text,
41
48
  target: target,
42
- "data-title-wrap": whiteSpace,
43
49
  ...LinkProps
44
- }, children ? children : text) : /*#__PURE__*/React.createElement("span", {
45
- className: `${style.subject} ${isDotted ? style.dotted : ''} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style[`font_${fontWeight}`]}`,
46
- "data-title": text,
47
- "data-id": dataId,
48
- "data-test-id": dataId,
49
- "data-title-wrap": whiteSpace,
50
- ...TextProps
50
+ }, children ? children : /*#__PURE__*/React.createElement(Typography, {
51
+ $tagAttributes_text: linkTagAttributes,
52
+ $i18n_dataTitle: text,
53
+ $ui_className: `${style.subject} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style.cursorPointer}`,
54
+ customId: dataId,
55
+ $flag_dotted: isDotted,
56
+ $ui_weight: fontWeight,
57
+ $ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
58
+ }, text)) : /*#__PURE__*/React.createElement(Typography, {
59
+ $tagAttributes_text: tagAttributesText,
60
+ $ui_className: `${style.subject} ${className} ${whiteSpaceClassMapping[whiteSpace]}`,
61
+ $flag_dotted: isDotted,
62
+ $ui_weight: fontWeight,
63
+ $i18n_dataTitle: text,
64
+ customId: dataId,
65
+ testId: dataId,
66
+ $ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
51
67
  }, text));
52
68
  }
53
69
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  exports[`Subject rendering the defult props 1`] = `
4
4
  <DocumentFragment>
5
- <span
6
- class="subject dotted whiteSpace_pre font_regular"
5
+ <div
6
+ class="dotted font_regular subject whiteSpace_pre"
7
7
  data-title-wrap="pre"
8
8
  />
9
9
  </DocumentFragment>
@@ -11,8 +11,8 @@ exports[`Subject rendering the defult props 1`] = `
11
11
 
12
12
  exports[`Subject rendering the whiteSpace of -break-spaces 1`] = `
13
13
  <DocumentFragment>
14
- <span
15
- class="subject dotted whiteSpace_breakSpaces font_regular"
14
+ <div
15
+ class="dotted font_regular subject whiteSpace_breakSpaces"
16
16
  data-title-wrap="break-spaces"
17
17
  />
18
18
  </DocumentFragment>
@@ -20,8 +20,8 @@ exports[`Subject rendering the whiteSpace of -break-spaces 1`] = `
20
20
 
21
21
  exports[`Subject rendering the whiteSpace of -normal 1`] = `
22
22
  <DocumentFragment>
23
- <span
24
- class="subject dotted whiteSpace_normal font_regular"
23
+ <div
24
+ class="dotted font_regular subject whiteSpace_normal"
25
25
  data-title-wrap="normal"
26
26
  />
27
27
  </DocumentFragment>
@@ -29,8 +29,8 @@ exports[`Subject rendering the whiteSpace of -normal 1`] = `
29
29
 
30
30
  exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
31
31
  <DocumentFragment>
32
- <span
33
- class="subject dotted whiteSpace_nowrap font_regular"
32
+ <div
33
+ class="dotted font_regular subject whiteSpace_nowrap"
34
34
  data-title-wrap="nowrap"
35
35
  />
36
36
  </DocumentFragment>
@@ -38,8 +38,8 @@ exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
38
38
 
39
39
  exports[`Subject rendering the whiteSpace of -pre 1`] = `
40
40
  <DocumentFragment>
41
- <span
42
- class="subject dotted whiteSpace_pre font_regular"
41
+ <div
42
+ class="dotted font_regular subject whiteSpace_pre"
43
43
  data-title-wrap="pre"
44
44
  />
45
45
  </DocumentFragment>
@@ -47,8 +47,8 @@ exports[`Subject rendering the whiteSpace of -pre 1`] = `
47
47
 
48
48
  exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
49
49
  <DocumentFragment>
50
- <span
51
- class="subject dotted whiteSpace_preLine font_regular"
50
+ <div
51
+ class="dotted font_regular subject whiteSpace_preLine"
52
52
  data-title-wrap="pre-line"
53
53
  />
54
54
  </DocumentFragment>
@@ -56,8 +56,8 @@ exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
56
56
 
57
57
  exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
58
58
  <DocumentFragment>
59
- <span
60
- class="subject dotted whiteSpace_preWrap font_regular"
59
+ <div
60
+ class="dotted font_regular subject whiteSpace_preWrap"
61
61
  data-title-wrap="pre-wrap"
62
62
  />
63
63
  </DocumentFragment>
@@ -4,5 +4,7 @@ export const defaultProps = {
4
4
  className: '',
5
5
  isDotted: true,
6
6
  customProps: {},
7
- whiteSpace: 'pre'
7
+ whiteSpace: 'pre',
8
+ isHighlighted: false,
9
+ highlightData: {}
8
10
  };
@@ -1,4 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
+ import { propTypes as typographyProps } from '@zohodesk/components/es/Typography/props/propTypes';
2
3
  export const propTypes = {
3
4
  className: PropTypes.string,
4
5
  dataId: PropTypes.string,
@@ -16,5 +17,8 @@ export const propTypes = {
16
17
  LinkProps: PropTypes.object,
17
18
  TextProps: PropTypes.object
18
19
  }),
19
- whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
20
+ whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']),
21
+ // Highlight props
22
+ isHighlighted: PropTypes.bool,
23
+ highlightData: typographyProps.$ui_highlightConfig
20
24
  };
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _CheckBox = _interopRequireDefault(require("@zohodesk/components/es/CheckBox/CheckBox"));
19
19
 
@@ -140,15 +140,24 @@ var CheckBoxField = /*#__PURE__*/function (_PureComponent) {
140
140
  renderProps: renderLabelProps
141
141
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
142
142
  text: labelName,
143
- id: id,
143
+ isRequired: isMandatory,
144
+ isDisabled: isDisabled,
145
+ isReadOnly: isReadOnly,
146
+ palette: labelPalette,
147
+ customClass: {
148
+ label: labelCustomClass,
149
+ container: !isDirectCol ? _FieldsModule["default"].checkboxText : ''
150
+ },
144
151
  size: fieldSize === 'small' ? 'small' : 'medium',
145
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
146
- infoText: infoText,
147
- customClass: "".concat(!isDirectCol ? _FieldsModule["default"].checkboxText : '', " ").concat(!isDirectCol ? _FieldsModule["default"]["lineClamp_".concat(lineClamp)] : '', " ").concat(isReadOnly || isDisabled ? _FieldsModule["default"].cbTextReadonly : _FieldsModule["default"].cbTextPointer, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
148
- title: labelName,
152
+ fontWeight: isDirectCol ? 'regular' : 'semibold',
153
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
154
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
149
155
  onClick: !removeEvent ? this.handleLabelClick : null,
150
- variant: isDirectCol ? 'default' : 'primary',
151
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
156
+ tagAttributes: {
157
+ label: {
158
+ id: id
159
+ }
160
+ }
152
161
  }, LabelProps)));
153
162
 
154
163
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -73,15 +73,16 @@ exports[`CheckBoxField rendering the custom children 1`] = `
73
73
  data-selector-id="fieldContainer"
74
74
  data-test-id="containerComponent"
75
75
  >
76
- <label
77
- class="label title medium default font_primary
78
- pointer checkboxText undefined cbTextPointer "
76
+ <div
77
+ class="inlineFlex row alignItems_center container default checkboxText"
79
78
  data-id="undefined_label"
80
- data-selector-id="label"
79
+ data-selector-id="undefined_label"
81
80
  data-test-id="undefined_label"
82
81
  >
83
- Label
84
- </label>
82
+ <label
83
+ class="size14 font_semibold label"
84
+ />
85
+ </div>
85
86
  </div>
86
87
  </div>
87
88
  </div>
@@ -164,15 +165,16 @@ exports[`CheckBoxField rendering the custom label children via renderLabelProps
164
165
  data-selector-id="fieldContainer"
165
166
  data-test-id="containerComponent"
166
167
  >
167
- <label
168
- class="label title medium default font_primary
169
- pointer checkboxText undefined cbTextPointer "
168
+ <div
169
+ class="inlineFlex row alignItems_center container default checkboxText"
170
170
  data-id="undefined_label"
171
- data-selector-id="label"
171
+ data-selector-id="undefined_label"
172
172
  data-test-id="undefined_label"
173
173
  >
174
- Label
175
- </label>
174
+ <label
175
+ class="size14 font_semibold label"
176
+ />
177
+ </div>
176
178
  {}
177
179
  </div>
178
180
  </div>
@@ -255,15 +257,16 @@ exports[`CheckBoxField rendering the defult props 1`] = `
255
257
  data-selector-id="fieldContainer"
256
258
  data-test-id="containerComponent"
257
259
  >
258
- <label
259
- class="label title medium default font_primary
260
- pointer checkboxText undefined cbTextPointer "
260
+ <div
261
+ class="inlineFlex row alignItems_center container default checkboxText"
261
262
  data-id="undefined_label"
262
- data-selector-id="label"
263
+ data-selector-id="undefined_label"
263
264
  data-test-id="undefined_label"
264
265
  >
265
- Label
266
- </label>
266
+ <label
267
+ class="size14 font_semibold label"
268
+ />
269
+ </div>
267
270
  </div>
268
271
  </div>
269
272
  </div>
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _TextBoxIcon = _interopRequireDefault(require("@zohodesk/components/es/TextBoxIcon/TextBoxIcon"));
19
19
 
@@ -178,11 +178,17 @@ var CurrencyField = /*#__PURE__*/function (_PureComponent) {
178
178
  renderProps: renderLabelProps
179
179
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
180
180
  text: labelName,
181
+ isRequired: isMandatory,
182
+ isDisabled: isDisabled,
183
+ isReadOnly: isReadOnly,
184
+ palette: labelPalette,
185
+ customClass: {
186
+ label: labelCustomClass
187
+ },
181
188
  size: fieldSize === 'small' ? 'small' : 'medium',
182
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
183
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
184
189
  htmlFor: uniqueId,
185
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
190
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
191
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
186
192
  }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
187
193
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
188
194
  }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], _extends({
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _DateWidget = _interopRequireDefault(require("@zohodesk/components/es/DateTime/DateWidget"));
19
19
 
@@ -185,15 +185,24 @@ var DateField = /*#__PURE__*/function (_PureComponent) {
185
185
  renderProps: renderLabelProps
186
186
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
187
187
  text: labelName,
188
- htmlFor: getAriaId,
188
+ isRequired: isMandatory,
189
+ isDisabled: isDisabled,
190
+ isReadOnly: isReadOnly,
191
+ palette: labelPalette,
192
+ customClass: {
193
+ label: labelCustomClass
194
+ },
189
195
  size: fieldSize === 'small' ? 'small' : 'medium',
190
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
196
+ htmlFor: getAriaId,
197
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
198
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
191
199
  onClick: isDisabled || isReadOnly ? null : this.handleLabelClick,
192
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
193
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
194
- }, LabelProps, {
195
- id: labelName
196
- }))), /*#__PURE__*/_react["default"].createElement("div", {
200
+ tagAttributes: {
201
+ label: {
202
+ id: labelName
203
+ }
204
+ }
205
+ }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
197
206
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
198
207
  }, isLocked && lockedValueText ? /*#__PURE__*/_react["default"].createElement("div", {
199
208
  className: _FieldsModule["default"].lockText
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _MultiSelect = _interopRequireDefault(require("@zohodesk/components/es/MultiSelect/MultiSelect"));
19
19
 
@@ -198,13 +198,20 @@ var MultiSelectField = /*#__PURE__*/function (_PureComponent) {
198
198
  renderProps: renderLabelProps
199
199
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
200
200
  text: labelName,
201
- id: id,
201
+ isRequired: isMandatory,
202
+ isDisabled: isDisabled,
203
+ isReadOnly: isReadOnly,
204
+ palette: labelPalette,
202
205
  size: fieldSize === 'small' ? 'small' : 'medium',
203
- palette: isDarkPalette ? 'dark' : isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette // onClick={this.handleLabelClick}
206
+ htmlFor: uniqueId // onClick={this.handleLabelClick}
204
207
  ,
205
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
206
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
207
- htmlFor: uniqueId
208
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
209
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
210
+ tagAttributes: {
211
+ label: {
212
+ id: id
213
+ }
214
+ }
208
215
  }, LabelProps))), /*#__PURE__*/_react["default"].createElement(_MultiSelect["default"], _extends({
209
216
  options: options,
210
217
  onChange: this.handleChange,
@@ -17,7 +17,7 @@ var _propTypes = require("./props/propTypes");
17
17
 
18
18
  var _Icon = _interopRequireDefault(require("@zohodesk/icons/es/Icon"));
19
19
 
20
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
20
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
21
21
 
22
22
  var _Radio = _interopRequireDefault(require("@zohodesk/components/es/Radio/Radio"));
23
23
 
@@ -188,10 +188,20 @@ var RadioField = /*#__PURE__*/function (_PureComponent) {
188
188
  }, labelName && /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
189
189
  text: labelName,
190
190
  size: "medium",
191
- id: id,
192
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : 'default',
193
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : '', " ").concat(customLabelClass),
194
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
191
+ isRequired: isMandatory,
192
+ isDisabled: isDisabled,
193
+ isReadOnly: isReadOnly,
194
+ palette: labelPalette,
195
+ customClass: {
196
+ label: customLabelClass
197
+ },
198
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
199
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
200
+ tagAttributes: {
201
+ label: {
202
+ id: id
203
+ }
204
+ }
195
205
  }, LabelProps)), /*#__PURE__*/_react["default"].createElement("div", {
196
206
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(isBoxStyle ? _FieldsModule["default"].radiosWrapper : '', " ").concat(labelName ? isBoxStyle ? _FieldsModule["default"].fieldMargin_large : _FieldsModule["default"].fieldMargin_medium : '', " ").concat(_FieldsModule["default"].radioContainer)
197
207
  }, options.map(function (option, index) {
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _Select = _interopRequireDefault(require("@zohodesk/components/es/Select/Select"));
19
19
 
@@ -166,14 +166,23 @@ var SelectField = /*#__PURE__*/function (_PureComponent) {
166
166
  renderProps: renderLabelProps
167
167
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
168
168
  text: labelName,
169
- size: fieldSize === 'small' ? 'small' : 'medium',
170
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
171
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
169
+ isRequired: isMandatory,
170
+ isDisabled: isDisabled,
171
+ isReadOnly: isReadOnly,
172
+ palette: labelPalette,
173
+ customClass: {
174
+ label: labelCustomClass
175
+ },
172
176
  htmlFor: uniqueId,
173
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
174
- }, LabelProps, {
175
- id: uniqueId
176
- }))), /*#__PURE__*/_react["default"].createElement("div", {
177
+ size: fieldSize === 'small' ? 'small' : 'medium',
178
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
179
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
180
+ tagAttributes: {
181
+ label: {
182
+ id: uniqueId
183
+ }
184
+ }
185
+ }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
177
186
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '', " ").concat(fieldClass ? fieldClass : '')
178
187
  }, /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
179
188
  options: options,
@@ -15,7 +15,7 @@ var _propTypes = require("./props/propTypes");
15
15
 
16
16
  var _Layout = require("@zohodesk/components/es/Layout");
17
17
 
18
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
18
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
19
19
 
20
20
  var _Popup = _interopRequireDefault(require("@zohodesk/components/es/Popup/Popup"));
21
21
 
@@ -247,13 +247,22 @@ var TagsMultiSelectField = function TagsMultiSelectField(props) {
247
247
  }
248
248
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
249
249
  text: labelName,
250
- title: labelName,
251
- id: id,
250
+ isRequired: isMandatory,
251
+ isDisabled: isDisabled,
252
+ isReadOnly: isReadOnly,
253
+ palette: labelPalette,
254
+ customClass: {
255
+ label: labelClass
256
+ },
257
+ htmlFor: htmlId,
252
258
  size: labelSize,
253
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
254
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : '', " ").concat(labelClass ? labelClass : ''),
255
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
256
- htmlFor: htmlId
259
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
260
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
261
+ tagAttributes: {
262
+ label: {
263
+ id: id
264
+ }
265
+ }
257
266
  }, LabelProps)), selectedValueCount ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
258
267
  dataId: "".concat(dataId, "_tagCount"),
259
268
  className: _TagsMultiSelectFieldModule["default"].count
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _TextBoxIcon = _interopRequireDefault(require("@zohodesk/components/es/TextBoxIcon/TextBoxIcon"));
19
19
 
@@ -156,14 +156,23 @@ var TextBoxField = /*#__PURE__*/function (_PureComponent) {
156
156
  renderProps: renderLabelProps
157
157
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
158
158
  text: labelName,
159
+ isRequired: isMandatory,
160
+ isDisabled: isDisabled,
161
+ isReadOnly: isReadOnly,
162
+ palette: labelPalette,
163
+ customClass: {
164
+ label: labelCustomClass
165
+ },
159
166
  size: fieldSize === 'small' ? 'small' : 'medium',
160
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
161
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
167
+ testId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
162
168
  htmlFor: uniqueId,
163
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
164
- }, LabelProps, {
165
- id: labelName
166
- }))), /*#__PURE__*/_react["default"].createElement("div", {
169
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
170
+ tagAttributes: {
171
+ label: {
172
+ id: labelName
173
+ }
174
+ }
175
+ }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
167
176
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
168
177
  }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], _extends({
169
178
  htmlId: uniqueId,