@zohodesk/components 1.0.0-temp-234 → 1.0.0-temp-235

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 (62) hide show
  1. package/README.md +0 -22
  2. package/es/ListItem/ListItem.js +3 -7
  3. package/es/ListItem/ListItemWithAvatar.js +6 -12
  4. package/es/ListItem/ListItemWithCheckBox.js +6 -12
  5. package/es/ListItem/ListItemWithIcon.js +5 -11
  6. package/es/ListItem/ListItemWithRadio.js +6 -12
  7. package/es/ListItem/__tests__/ListItem.spec.js +0 -19
  8. package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -19
  9. package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -19
  10. package/es/ListItem/__tests__/ListItemWithIcon.spec.js +0 -17
  11. package/es/ListItem/__tests__/ListItemWithRadio.spec.js +0 -19
  12. package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +0 -78
  13. package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +46 -140
  14. package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +49 -251
  15. package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +50 -144
  16. package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +52 -252
  17. package/es/ListItem/props/propTypes.js +5 -15
  18. package/es/MultiSelect/MultiSelect.js +1 -8
  19. package/es/Select/GroupSelect.js +2 -4
  20. package/es/Select/Select.js +1 -7
  21. package/es/Select/SelectWithAvatar.js +3 -14
  22. package/es/Select/SelectWithIcon.js +2 -6
  23. package/es/Select/props/defaultProps.js +0 -1
  24. package/es/Select/props/propTypes.js +0 -5
  25. package/es/Typography/Typography.js +9 -2
  26. package/es/Typography/__tests__/Typography.spec.js +334 -0
  27. package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +451 -0
  28. package/es/Typography/highlight.js +144 -0
  29. package/es/Typography/props/defaultProps.js +2 -1
  30. package/es/Typography/props/propTypes.js +26 -1
  31. package/es/utils/dropDownUtils.js +3 -12
  32. package/lib/ListItem/ListItem.js +3 -8
  33. package/lib/ListItem/ListItemWithAvatar.js +6 -13
  34. package/lib/ListItem/ListItemWithCheckBox.js +6 -13
  35. package/lib/ListItem/ListItemWithIcon.js +5 -11
  36. package/lib/ListItem/ListItemWithRadio.js +6 -13
  37. package/lib/ListItem/__tests__/ListItem.spec.js +0 -23
  38. package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -23
  39. package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -23
  40. package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +0 -21
  41. package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +0 -23
  42. package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +0 -78
  43. package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +46 -140
  44. package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +49 -251
  45. package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +50 -144
  46. package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +52 -252
  47. package/lib/ListItem/props/propTypes.js +6 -15
  48. package/lib/MultiSelect/MultiSelect.js +2 -6
  49. package/lib/Select/GroupSelect.js +3 -4
  50. package/lib/Select/Select.js +1 -7
  51. package/lib/Select/SelectWithAvatar.js +6 -14
  52. package/lib/Select/SelectWithIcon.js +3 -6
  53. package/lib/Select/props/defaultProps.js +0 -1
  54. package/lib/Select/props/propTypes.js +0 -5
  55. package/lib/Typography/Typography.js +9 -2
  56. package/lib/Typography/__tests__/Typography.spec.js +342 -0
  57. package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +451 -0
  58. package/lib/Typography/highlight.js +151 -0
  59. package/lib/Typography/props/defaultProps.js +2 -1
  60. package/lib/Typography/props/propTypes.js +31 -1
  61. package/lib/utils/dropDownUtils.js +3 -14
  62. package/package.json +1 -1
package/README.md CHANGED
@@ -2,28 +2,6 @@
2
2
 
3
3
  Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
4
4
 
5
- # 1.4.12
6
-
7
- - **Select**
8
- - `secondaryField` prop supported to render secondary value inside the options
9
- - `searchFields` prop suppored to additional values based search
10
-
11
- - **MultiSelect**
12
- - `secondaryField` prop supported to render secondary value inside the options
13
- - `SuggestionsProps` supported under **customProps** prop
14
-
15
- - **SelectWithIcon**
16
- - `secondaryValueKey` prop supported to render secondary value inside the options
17
- - `ListItemProps` supported under **customProps** prop
18
-
19
- - **SelectWithAvatar**
20
- - `secondaryField` prop supported to render secondary value inside the options
21
- - `customProps` props supported with **TextBoxProps**, **DropdownSearchTextBoxProps** and **SuggestionsProps**
22
-
23
- - **GroupSelect**
24
- - `secondaryField` option supported under **groupedOptions** prop to render secondary value inside the options
25
- - `SuggestionsProps` supported under **customProps** prop
26
-
27
5
  # 1.4.11
28
6
 
29
7
  - `@zohodesk/virtualizer` version updated from **1.0.3** to **1.0.13**
@@ -71,8 +71,7 @@ export default class ListItem extends React.Component {
71
71
  customClass,
72
72
  customProps,
73
73
  needMultiLineText,
74
- secondaryValue,
75
- renderValueRightPlaceholderNode
74
+ secondaryValue
76
75
  } = this.props;
77
76
  let {
78
77
  ListItemProps = {},
@@ -80,8 +79,7 @@ export default class ListItem extends React.Component {
80
79
  } = customProps;
81
80
  let {
82
81
  customListItem = '',
83
- customTickIcon = '',
84
- customValueRightPlaceholder = ''
82
+ customTickIcon = ''
85
83
  } = customClass;
86
84
  const listA11y = {
87
85
  ariaHidden: true,
@@ -125,9 +123,7 @@ export default class ListItem extends React.Component {
125
123
  shrink: true,
126
124
  adjust: true,
127
125
  className: needMultiLineText ? style.multiLineValue : style.value
128
- }, value) : null, typeof renderValueRightPlaceholderNode === 'function' ? /*#__PURE__*/React.createElement(Box, {
129
- className: customValueRightPlaceholder
130
- }, renderValueRightPlaceholderNode()) : null, children ? /*#__PURE__*/React.createElement(Box, {
126
+ }, value) : null, children ? /*#__PURE__*/React.createElement(Box, {
131
127
  shrink: true,
132
128
  adjust: true,
133
129
  className: style.children
@@ -76,7 +76,6 @@ export default class ListItemWithAvatar extends React.PureComponent {
76
76
  customProps,
77
77
  needMultiLineText,
78
78
  secondaryValue,
79
- renderValueRightPlaceholderNode,
80
79
  lhsAlignContent
81
80
  } = this.props;
82
81
  let {
@@ -88,8 +87,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
88
87
  let {
89
88
  customListItem = '',
90
89
  customAvatar = '',
91
- customAvatarTeam = '',
92
- customValueRightPlaceholder = ''
90
+ customAvatarTeam = ''
93
91
  } = customClass;
94
92
  const listA11y = {
95
93
  ariaHidden: true,
@@ -150,20 +148,16 @@ export default class ListItemWithAvatar extends React.PureComponent {
150
148
  ...AvatarProps
151
149
  }))) : null, /*#__PURE__*/React.createElement(Box, {
152
150
  flexible: true,
153
- className: style.leftBox
154
- }, /*#__PURE__*/React.createElement(Box, {
155
- className: style.titleBox
151
+ shrink: true
152
+ }, /*#__PURE__*/React.createElement(Container, {
153
+ alignBox: "column"
156
154
  }, value ? /*#__PURE__*/React.createElement(Box, {
157
- shrink: true,
158
- adjust: true,
159
155
  "data-title": isDisabled ? null : title,
160
156
  className: needMultiLineText ? style.multiLineValue : style.value
161
- }, value) : null, typeof renderValueRightPlaceholderNode === 'function' ? /*#__PURE__*/React.createElement(Box, {
162
- className: customValueRightPlaceholder
163
- }, renderValueRightPlaceholderNode()) : null), secondaryValue ? /*#__PURE__*/React.createElement(Box, {
157
+ }, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
164
158
  "data-title": isDisabled ? null : secondaryValue,
165
159
  className: `${style.secondaryField} ${needMultiLineText ? style.multiLine : style.secondaryValue}`
166
- }, secondaryValue) : null), needTick && active ? /*#__PURE__*/React.createElement(Box, {
160
+ }, secondaryValue) : null)), needTick && active ? /*#__PURE__*/React.createElement(Box, {
167
161
  className: style.tickIcon,
168
162
  "aria-hidden": ariaHidden,
169
163
  dataId: `${dataIdString}_tickIcon`,
@@ -61,7 +61,6 @@ export default class ListItemWithCheckBox extends React.Component {
61
61
  customProps,
62
62
  needMultiLineText,
63
63
  secondaryValue,
64
- renderValueRightPlaceholderNode,
65
64
  lhsAlignContent,
66
65
  lhsJustifyContent
67
66
  } = this.props;
@@ -76,8 +75,7 @@ export default class ListItemWithCheckBox extends React.Component {
76
75
  let {
77
76
  customListItem = '',
78
77
  customCheckBox = '',
79
- customLabel = '',
80
- customValueRightPlaceholder = ''
78
+ customLabel = ''
81
79
  } = customClass;
82
80
  return /*#__PURE__*/React.createElement(ListContainer, {
83
81
  a11y: listA11y,
@@ -114,20 +112,16 @@ export default class ListItemWithCheckBox extends React.Component {
114
112
  }
115
113
  }))), /*#__PURE__*/React.createElement(Box, {
116
114
  flexible: true,
117
- className: style.leftBox
118
- }, /*#__PURE__*/React.createElement(Box, {
119
- className: style.titleBox
115
+ shrink: true
116
+ }, /*#__PURE__*/React.createElement(Container, {
117
+ alignBox: "column"
120
118
  }, value ? /*#__PURE__*/React.createElement(Box, {
121
- shrink: true,
122
- adjust: true,
123
119
  "data-title": isDisabled ? null : title,
124
120
  className: needMultiLineText ? style.multiLineValue : style.value
125
- }, value) : null, typeof renderValueRightPlaceholderNode === 'function' ? /*#__PURE__*/React.createElement(Box, {
126
- className: customValueRightPlaceholder
127
- }, renderValueRightPlaceholderNode()) : null), secondaryValue ? /*#__PURE__*/React.createElement(Box, {
121
+ }, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
128
122
  "data-title": isDisabled ? null : secondaryValue,
129
123
  className: `${style.secondaryField} ${needMultiLineText ? style.multiLine : style.secondaryValue}`
130
- }, secondaryValue) : null));
124
+ }, secondaryValue) : null)));
131
125
  }
132
126
 
133
127
  }
@@ -69,11 +69,9 @@ export default class ListItemWithIcon extends React.Component {
69
69
  disableTitle,
70
70
  a11y,
71
71
  customClass,
72
- customValueRightPlaceholderClass,
73
72
  customProps,
74
73
  needMultiLineText,
75
74
  secondaryValue,
76
- renderValueRightPlaceholderNode,
77
75
  lhsAlignContent,
78
76
  lhsJustifyContent
79
77
  } = this.props;
@@ -129,21 +127,17 @@ export default class ListItemWithIcon extends React.Component {
129
127
  className: iconClass
130
128
  }) : null, /*#__PURE__*/React.createElement(Box, {
131
129
  flexible: true,
132
- className: style.leftBox
133
- }, /*#__PURE__*/React.createElement(Box, {
134
- className: style.titleBox
130
+ shrink: true
131
+ }, /*#__PURE__*/React.createElement(Container, {
132
+ alignBox: "column"
135
133
  }, value ? /*#__PURE__*/React.createElement(Box, {
136
- shrink: true,
137
- adjust: true,
138
134
  className: needMultiLineText ? style.multiLineValue : style.value,
139
135
  "data-title": isDisabled ? null : title,
140
136
  dataId: `${dataIdString}_Text`
141
- }, value) : null, typeof renderValueRightPlaceholderNode === 'function' ? /*#__PURE__*/React.createElement(Box, {
142
- className: customValueRightPlaceholderClass
143
- }, renderValueRightPlaceholderNode()) : null), secondaryValue ? /*#__PURE__*/React.createElement(Box, {
137
+ }, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
144
138
  "data-title": isDisabled ? null : secondaryValue,
145
139
  className: `${style.secondaryField} ${needMultiLineText ? style.multiLine : style.secondaryValue}`
146
- }, secondaryValue) : null), needTick && active ? /*#__PURE__*/React.createElement(Box, {
140
+ }, secondaryValue) : null)), needTick && active ? /*#__PURE__*/React.createElement(Box, {
147
141
  className: style.tickIcon,
148
142
  "aria-hidden": ariaHidden,
149
143
  dataId: `${dataIdString}_tickIcon`,
@@ -62,7 +62,6 @@ export default class ListItemWithRadio extends React.Component {
62
62
  customProps,
63
63
  needMultiLineText,
64
64
  secondaryValue,
65
- renderValueRightPlaceholderNode,
66
65
  lhsAlignContent,
67
66
  lhsJustifyContent
68
67
  } = this.props;
@@ -77,8 +76,7 @@ export default class ListItemWithRadio extends React.Component {
77
76
  let {
78
77
  customListItem = '',
79
78
  customRadio = '',
80
- customRadioWrap = '',
81
- customValueRightPlaceholder = ''
79
+ customRadioWrap = ''
82
80
  } = customClass;
83
81
  return /*#__PURE__*/React.createElement(ListContainer, {
84
82
  a11y: listA11y,
@@ -117,20 +115,16 @@ export default class ListItemWithRadio extends React.Component {
117
115
  }
118
116
  }))), /*#__PURE__*/React.createElement(Box, {
119
117
  flexible: true,
120
- className: style.leftBox
121
- }, /*#__PURE__*/React.createElement(Box, {
122
- className: style.titleBox
118
+ shrink: true
119
+ }, /*#__PURE__*/React.createElement(Container, {
120
+ alignBox: "column"
123
121
  }, value ? /*#__PURE__*/React.createElement(Box, {
124
- shrink: true,
125
- adjust: true,
126
122
  "data-title": disableTitle ? null : title,
127
123
  className: needMultiLineText ? style.multiLineValue : style.value
128
- }, value) : null, typeof renderValueRightPlaceholderNode === 'function' ? /*#__PURE__*/React.createElement(Box, {
129
- className: customValueRightPlaceholder
130
- }, renderValueRightPlaceholderNode()) : null), secondaryValue ? /*#__PURE__*/React.createElement(Box, {
124
+ }, value) : null, secondaryValue ? /*#__PURE__*/React.createElement(Box, {
131
125
  "data-title": isDisabled ? null : secondaryValue,
132
126
  className: `${style.secondaryField} ${needMultiLineText ? style.multiLine : style.secondaryValue}`
133
- }, secondaryValue) : null));
127
+ }, secondaryValue) : null)));
134
128
  }
135
129
 
136
130
  }
@@ -8,23 +8,4 @@ describe('ListItem', () => {
8
8
  } = render( /*#__PURE__*/React.createElement(ListItem, null));
9
9
  expect(asFragment()).toMatchSnapshot();
10
10
  });
11
- test('ListItem with renderValueRightPlaceholderNode', () => {
12
- const {
13
- asFragment
14
- } = render( /*#__PURE__*/React.createElement(ListItem, {
15
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder")
16
- }));
17
- expect(asFragment()).toMatchSnapshot();
18
- });
19
- test('ListItem with renderValueRightPlaceholderNode & it\'s custom class', () => {
20
- const {
21
- asFragment
22
- } = render( /*#__PURE__*/React.createElement(ListItem, {
23
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder"),
24
- customClass: {
25
- customValueRightPlaceholder: "customValueRightPlaceholderClass"
26
- }
27
- }));
28
- expect(asFragment()).toMatchSnapshot();
29
- });
30
11
  });
@@ -43,23 +43,4 @@ describe('ListItemWithAvatar', () => {
43
43
  }));
44
44
  expect(asFragment()).toMatchSnapshot();
45
45
  });
46
- test('ListItemWithAvatar with renderValueRightPlaceholderNode', () => {
47
- const {
48
- asFragment
49
- } = render( /*#__PURE__*/React.createElement(ListItemWithAvatar, {
50
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder")
51
- }));
52
- expect(asFragment()).toMatchSnapshot();
53
- });
54
- test('ListItemWithAvatar with renderValueRightPlaceholderNode & it\'s custom class', () => {
55
- const {
56
- asFragment
57
- } = render( /*#__PURE__*/React.createElement(ListItemWithAvatar, {
58
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder"),
59
- customClass: {
60
- customValueRightPlaceholder: "customValueRightPlaceholderClass"
61
- }
62
- }));
63
- expect(asFragment()).toMatchSnapshot();
64
- });
65
46
  });
@@ -43,23 +43,4 @@ describe('ListItemWithCheckBox', () => {
43
43
  }));
44
44
  expect(asFragment()).toMatchSnapshot();
45
45
  });
46
- test('ListItemWithCheckBox with renderValueRightPlaceholderNode', () => {
47
- const {
48
- asFragment
49
- } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, {
50
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder")
51
- }));
52
- expect(asFragment()).toMatchSnapshot();
53
- });
54
- test('ListItemWithCheckBox with renderValueRightPlaceholderNode & it\'s custom class', () => {
55
- const {
56
- asFragment
57
- } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, {
58
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder"),
59
- customClass: {
60
- customValueRightPlaceholder: "customValueRightPlaceholderClass"
61
- }
62
- }));
63
- expect(asFragment()).toMatchSnapshot();
64
- });
65
46
  });
@@ -43,21 +43,4 @@ describe('ListItemWithIcon', () => {
43
43
  }));
44
44
  expect(asFragment()).toMatchSnapshot();
45
45
  });
46
- test('ListItemWithIcon with renderValueRightPlaceholderNode', () => {
47
- const {
48
- asFragment
49
- } = render( /*#__PURE__*/React.createElement(ListItemWithIcon, {
50
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder")
51
- }));
52
- expect(asFragment()).toMatchSnapshot();
53
- });
54
- test('ListItemWithIcon with renderValueRightPlaceholderNode & it\'s custom class', () => {
55
- const {
56
- asFragment
57
- } = render( /*#__PURE__*/React.createElement(ListItemWithIcon, {
58
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder"),
59
- customValueRightPlaceholderClass: "customValueRightPlaceholderClass"
60
- }));
61
- expect(asFragment()).toMatchSnapshot();
62
- });
63
46
  });
@@ -43,23 +43,4 @@ describe('ListItemWithRadio', () => {
43
43
  }));
44
44
  expect(asFragment()).toMatchSnapshot();
45
45
  });
46
- test('ListItemWithRadio with renderValueRightPlaceholderNode', () => {
47
- const {
48
- asFragment
49
- } = render( /*#__PURE__*/React.createElement(ListItemWithRadio, {
50
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder")
51
- }));
52
- expect(asFragment()).toMatchSnapshot();
53
- });
54
- test('ListItemWithRadio with renderValueRightPlaceholderNode & it\'s custom class', () => {
55
- const {
56
- asFragment
57
- } = render( /*#__PURE__*/React.createElement(ListItemWithRadio, {
58
- renderValueRightPlaceholderNode: () => /*#__PURE__*/React.createElement("div", null, "Custom Placeholder"),
59
- customClass: {
60
- customValueRightPlaceholder: "customValueRightPlaceholderClass"
61
- }
62
- }));
63
- expect(asFragment()).toMatchSnapshot();
64
- });
65
46
  });
@@ -1,83 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`ListItem ListItem with renderValueRightPlaceholderNode & it's custom class 1`] = `
4
- <DocumentFragment>
5
- <li
6
- class="list medium default withBorder flex rowdir vCenter"
7
- data-a11y-inset-focus="true"
8
- data-id="listItem"
9
- data-selector-id="listItem"
10
- data-test-id="listItem"
11
- role="option"
12
- tabindex="0"
13
- >
14
- <div
15
- class="leftBox grow basis shrinkOff"
16
- data-id="boxComponent"
17
- data-selector-id="box"
18
- data-test-id="boxComponent"
19
- >
20
- <div
21
- class="titleBox shrinkOff"
22
- data-id="boxComponent"
23
- data-selector-id="box"
24
- data-test-id="boxComponent"
25
- >
26
- <div
27
- class="customValueRightPlaceholderClass shrinkOff"
28
- data-id="boxComponent"
29
- data-selector-id="box"
30
- data-test-id="boxComponent"
31
- >
32
- <div>
33
- Custom Placeholder
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- </li>
39
- </DocumentFragment>
40
- `;
41
-
42
- exports[`ListItem ListItem with renderValueRightPlaceholderNode 1`] = `
43
- <DocumentFragment>
44
- <li
45
- class="list medium default withBorder flex rowdir vCenter"
46
- data-a11y-inset-focus="true"
47
- data-id="listItem"
48
- data-selector-id="listItem"
49
- data-test-id="listItem"
50
- role="option"
51
- tabindex="0"
52
- >
53
- <div
54
- class="leftBox grow basis shrinkOff"
55
- data-id="boxComponent"
56
- data-selector-id="box"
57
- data-test-id="boxComponent"
58
- >
59
- <div
60
- class="titleBox shrinkOff"
61
- data-id="boxComponent"
62
- data-selector-id="box"
63
- data-test-id="boxComponent"
64
- >
65
- <div
66
- class="shrinkOff"
67
- data-id="boxComponent"
68
- data-selector-id="box"
69
- data-test-id="boxComponent"
70
- >
71
- <div>
72
- Custom Placeholder
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </li>
78
- </DocumentFragment>
79
- `;
80
-
81
3
  exports[`ListItem rendering the defult props 1`] = `
82
4
  <DocumentFragment>
83
5
  <li