@zohodesk/dot 1.9.4 → 1.9.6

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.
package/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  In this Library, we Provide Some Basic Components to Build Your Application
4
4
 
5
+ # 1.9.5, # 1.9.6
6
+
7
+ - **listCommon.module.css** A css active ignore comment has been added to fix the hover and click pseudo-class collision issue on iOS tablets.
8
+ - **list/Subject** dataId and testId have been moved back to the parent element as they were earlier.
9
+
5
10
  # 1.9.4
6
11
 
7
12
  - **list/Subject** testId added in missed place (issue fix)
@@ -47,13 +47,12 @@ export default class Subject extends Component {
47
47
  href: href,
48
48
  urlData: urlData,
49
49
  onClick: onClick,
50
- target: target
50
+ target: target,
51
+ dataId: dataId
51
52
  }, LinkProps), children ? children : /*#__PURE__*/React.createElement(Typography, {
52
53
  $tagAttributes_text: linkTagAttributes,
53
54
  $i18n_dataTitle: text,
54
55
  $ui_className: `${style.subject} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style.cursorPointer}`,
55
- customId: dataId,
56
- testId: dataId,
57
56
  $flag_dotted: isDotted,
58
57
  $ui_weight: fontWeight,
59
58
  $ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
+ import '@testing-library/jest-dom';
3
4
  import Subject from "../Subject";
4
5
  describe('Subject', () => {
5
6
  test('rendering the defult props', () => {
@@ -17,4 +18,120 @@ describe('Subject', () => {
17
18
  }));
18
19
  expect(asFragment()).toMatchSnapshot();
19
20
  });
21
+ test.each(whiteSpace)('rendering the whiteSpace of -%s', whiteSpace => {
22
+ const {
23
+ asFragment
24
+ } = render( /*#__PURE__*/React.createElement(Subject, {
25
+ whiteSpace: whiteSpace,
26
+ isLink: true
27
+ }));
28
+ expect(asFragment()).toMatchSnapshot();
29
+ });
30
+ test('renders data attributes on link wrapper', () => {
31
+ const dataId = 'subject-id';
32
+ const {
33
+ container
34
+ } = render( /*#__PURE__*/React.createElement(Subject, {
35
+ isLink: true,
36
+ dataId: dataId
37
+ }));
38
+ expect(container).toMatchSnapshot();
39
+ const anchor = container.querySelector('a');
40
+ expect(anchor.getAttribute('data-id')).toBe(dataId);
41
+ expect(anchor.getAttribute('data-test-id')).toBe(dataId);
42
+ });
43
+ test('renders text content', () => {
44
+ const text = 'Test Subject';
45
+ const {
46
+ container
47
+ } = render( /*#__PURE__*/React.createElement(Subject, {
48
+ text: text
49
+ }));
50
+ expect(container.textContent).toContain(text);
51
+ });
52
+ test('renders with custom className', () => {
53
+ const customClass = 'custom-subject';
54
+ const {
55
+ container
56
+ } = render( /*#__PURE__*/React.createElement(Subject, {
57
+ className: customClass
58
+ }));
59
+ expect(container.querySelector(`.${customClass}`)).not.toBeNull();
60
+ });
61
+ test('renders dotted text when isDotted is true', () => {
62
+ const {
63
+ asFragment
64
+ } = render( /*#__PURE__*/React.createElement(Subject, {
65
+ text: "Test",
66
+ isDotted: true
67
+ }));
68
+ expect(asFragment()).toMatchSnapshot();
69
+ });
70
+ test('renders children when provided', () => {
71
+ const {
72
+ container
73
+ } = render( /*#__PURE__*/React.createElement(Subject, {
74
+ isLink: true
75
+ }, /*#__PURE__*/React.createElement("span", null, "Custom Child")));
76
+ expect(container.querySelector('span').textContent).toBe('Custom Child');
77
+ });
78
+ test('applies fontWeight prop', () => {
79
+ const {
80
+ asFragment
81
+ } = render( /*#__PURE__*/React.createElement(Subject, {
82
+ text: "Test",
83
+ fontWeight: "bold"
84
+ }));
85
+ expect(asFragment()).toMatchSnapshot();
86
+ });
87
+ test('renders with href when isLink is true', () => {
88
+ const href = 'https://example.com';
89
+ const {
90
+ container
91
+ } = render( /*#__PURE__*/React.createElement(Subject, {
92
+ isLink: true,
93
+ href: href
94
+ }));
95
+ expect(container.querySelector('a').getAttribute('href')).toBe(href);
96
+ });
97
+ test('calls onClick when link is clicked', () => {
98
+ const handleClick = jest.fn();
99
+ const {
100
+ container
101
+ } = render( /*#__PURE__*/React.createElement(Subject, {
102
+ isLink: true,
103
+ onClick: handleClick
104
+ }));
105
+ container.querySelector('a').click();
106
+ expect(handleClick).toHaveBeenCalled();
107
+ });
108
+ test('renders as non-link when isLink is false', () => {
109
+ const {
110
+ container
111
+ } = render( /*#__PURE__*/React.createElement(Subject, {
112
+ text: "Test",
113
+ isLink: false
114
+ }));
115
+ expect(container.querySelector('a')).toBeNull();
116
+ });
117
+ test('applies custom className to non-link element', () => {
118
+ const customClass = 'test-class';
119
+ const {
120
+ container
121
+ } = render( /*#__PURE__*/React.createElement(Subject, {
122
+ text: "Test",
123
+ className: customClass,
124
+ isLink: false
125
+ }));
126
+ expect(container.querySelector(`.${customClass}`)).not.toBeNull();
127
+ });
128
+ test('renders with target prop on link', () => {
129
+ const {
130
+ container
131
+ } = render( /*#__PURE__*/React.createElement(Subject, {
132
+ isLink: true,
133
+ target: "_blank"
134
+ }));
135
+ expect(container.querySelector('a').getAttribute('target')).toBe('_blank');
136
+ });
20
137
  });
@@ -1,5 +1,17 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Subject applies fontWeight prop 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="dotted font_bold subject whiteSpace_pre"
7
+ data-title="Test"
8
+ data-title-wrap="pre"
9
+ >
10
+ Test
11
+ </div>
12
+ </DocumentFragment>
13
+ `;
14
+
3
15
  exports[`Subject rendering the defult props 1`] = `
4
16
  <DocumentFragment>
5
17
  <div
@@ -18,6 +30,21 @@ exports[`Subject rendering the whiteSpace of -break-spaces 1`] = `
18
30
  </DocumentFragment>
19
31
  `;
20
32
 
33
+ exports[`Subject rendering the whiteSpace of -break-spaces 2`] = `
34
+ <DocumentFragment>
35
+ <a
36
+ class="container "
37
+ href="javascript:void(0);"
38
+ rel="noopener noreferrer"
39
+ >
40
+ <div
41
+ class="dotted font_regular subject whiteSpace_breakSpaces cursorPointer"
42
+ data-title-wrap="break-spaces"
43
+ />
44
+ </a>
45
+ </DocumentFragment>
46
+ `;
47
+
21
48
  exports[`Subject rendering the whiteSpace of -normal 1`] = `
22
49
  <DocumentFragment>
23
50
  <div
@@ -27,6 +54,21 @@ exports[`Subject rendering the whiteSpace of -normal 1`] = `
27
54
  </DocumentFragment>
28
55
  `;
29
56
 
57
+ exports[`Subject rendering the whiteSpace of -normal 2`] = `
58
+ <DocumentFragment>
59
+ <a
60
+ class="container "
61
+ href="javascript:void(0);"
62
+ rel="noopener noreferrer"
63
+ >
64
+ <div
65
+ class="dotted font_regular subject whiteSpace_normal cursorPointer"
66
+ data-title-wrap="normal"
67
+ />
68
+ </a>
69
+ </DocumentFragment>
70
+ `;
71
+
30
72
  exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
31
73
  <DocumentFragment>
32
74
  <div
@@ -36,6 +78,21 @@ exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
36
78
  </DocumentFragment>
37
79
  `;
38
80
 
81
+ exports[`Subject rendering the whiteSpace of -nowrap 2`] = `
82
+ <DocumentFragment>
83
+ <a
84
+ class="container "
85
+ href="javascript:void(0);"
86
+ rel="noopener noreferrer"
87
+ >
88
+ <div
89
+ class="dotted font_regular subject whiteSpace_nowrap cursorPointer"
90
+ data-title-wrap="nowrap"
91
+ />
92
+ </a>
93
+ </DocumentFragment>
94
+ `;
95
+
39
96
  exports[`Subject rendering the whiteSpace of -pre 1`] = `
40
97
  <DocumentFragment>
41
98
  <div
@@ -45,6 +102,21 @@ exports[`Subject rendering the whiteSpace of -pre 1`] = `
45
102
  </DocumentFragment>
46
103
  `;
47
104
 
105
+ exports[`Subject rendering the whiteSpace of -pre 2`] = `
106
+ <DocumentFragment>
107
+ <a
108
+ class="container "
109
+ href="javascript:void(0);"
110
+ rel="noopener noreferrer"
111
+ >
112
+ <div
113
+ class="dotted font_regular subject whiteSpace_pre cursorPointer"
114
+ data-title-wrap="pre"
115
+ />
116
+ </a>
117
+ </DocumentFragment>
118
+ `;
119
+
48
120
  exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
49
121
  <DocumentFragment>
50
122
  <div
@@ -54,6 +126,21 @@ exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
54
126
  </DocumentFragment>
55
127
  `;
56
128
 
129
+ exports[`Subject rendering the whiteSpace of -pre-line 2`] = `
130
+ <DocumentFragment>
131
+ <a
132
+ class="container "
133
+ href="javascript:void(0);"
134
+ rel="noopener noreferrer"
135
+ >
136
+ <div
137
+ class="dotted font_regular subject whiteSpace_preLine cursorPointer"
138
+ data-title-wrap="pre-line"
139
+ />
140
+ </a>
141
+ </DocumentFragment>
142
+ `;
143
+
57
144
  exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
58
145
  <DocumentFragment>
59
146
  <div
@@ -62,3 +149,47 @@ exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
62
149
  />
63
150
  </DocumentFragment>
64
151
  `;
152
+
153
+ exports[`Subject rendering the whiteSpace of -pre-wrap 2`] = `
154
+ <DocumentFragment>
155
+ <a
156
+ class="container "
157
+ href="javascript:void(0);"
158
+ rel="noopener noreferrer"
159
+ >
160
+ <div
161
+ class="dotted font_regular subject whiteSpace_preWrap cursorPointer"
162
+ data-title-wrap="pre-wrap"
163
+ />
164
+ </a>
165
+ </DocumentFragment>
166
+ `;
167
+
168
+ exports[`Subject renders data attributes on link wrapper 1`] = `
169
+ <div>
170
+ <a
171
+ class="container "
172
+ data-id="subject-id"
173
+ data-test-id="subject-id"
174
+ href="javascript:void(0);"
175
+ rel="noopener noreferrer"
176
+ >
177
+ <div
178
+ class="dotted font_regular subject whiteSpace_pre cursorPointer"
179
+ data-title-wrap="pre"
180
+ />
181
+ </a>
182
+ </div>
183
+ `;
184
+
185
+ exports[`Subject renders dotted text when isDotted is true 1`] = `
186
+ <DocumentFragment>
187
+ <div
188
+ class="dotted font_regular subject whiteSpace_pre"
189
+ data-title="Test"
190
+ data-title-wrap="pre"
191
+ >
192
+ Test
193
+ </div>
194
+ </DocumentFragment>
195
+ `;
@@ -1,10 +1,11 @@
1
+ import { DUMMY_OBJECT } from '@zohodesk/dotkit/es/utils/constants';
1
2
  export const defaultProps = {
2
3
  isLink: false,
3
4
  fontWeight: 'regular',
4
5
  className: '',
5
6
  isDotted: true,
6
- customProps: {},
7
+ customProps: DUMMY_OBJECT,
7
8
  whiteSpace: 'pre',
8
9
  isHighlighted: false,
9
- highlightData: {}
10
+ highlightData: DUMMY_OBJECT
10
11
  };
@@ -41,7 +41,7 @@
41
41
  .classic .floatingIconContainer {
42
42
  display: none;
43
43
  }
44
-
44
+ /*Active:ignore*/
45
45
  .compact .floatingIconContainer,
46
46
  .superCompact .floatingIconContainer,
47
47
  .listContainer:hover .classic .floatingIconContainer,
@@ -69,7 +69,7 @@
69
69
  position: relative;
70
70
  transition: var(--zd_transition3) all ease;
71
71
  }
72
-
72
+ /*Active:ignore*/
73
73
  .listContainer:hover .compact .floatingIconContainer,
74
74
  .listContainer:hover .superCompact .floatingIconContainer,
75
75
  .hoveredStyle .compact .floatingIconContainer,
@@ -105,13 +105,12 @@ var Subject = /*#__PURE__*/function (_Component) {
105
105
  href: href,
106
106
  urlData: urlData,
107
107
  onClick: onClick,
108
- target: target
108
+ target: target,
109
+ dataId: dataId
109
110
  }, LinkProps), children ? children : /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
110
111
  $tagAttributes_text: linkTagAttributes,
111
112
  $i18n_dataTitle: text,
112
113
  $ui_className: "".concat(_SubjectModule["default"].subject, " ").concat(_cssUtils.whiteSpaceClassMapping[whiteSpace], " ").concat(className, " ").concat(_SubjectModule["default"].cursorPointer),
113
- customId: dataId,
114
- testId: dataId,
115
114
  $flag_dotted: isDotted,
116
115
  $ui_weight: fontWeight,
117
116
  $ui_highlightConfig: isHighlighted ? highlightData : _Common.DUMMY_OBJECT
@@ -4,6 +4,8 @@ var _react = _interopRequireDefault(require("react"));
4
4
 
5
5
  var _react2 = require("@testing-library/react");
6
6
 
7
+ require("@testing-library/jest-dom");
8
+
7
9
  var _Subject = _interopRequireDefault(require("../Subject"));
8
10
 
9
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -24,4 +26,126 @@ describe('Subject', function () {
24
26
 
25
27
  expect(asFragment()).toMatchSnapshot();
26
28
  });
29
+ test.each(whiteSpace)('rendering the whiteSpace of -%s', function (whiteSpace) {
30
+ var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
31
+ whiteSpace: whiteSpace,
32
+ isLink: true
33
+ })),
34
+ asFragment = _render3.asFragment;
35
+
36
+ expect(asFragment()).toMatchSnapshot();
37
+ });
38
+ test('renders data attributes on link wrapper', function () {
39
+ var dataId = 'subject-id';
40
+
41
+ var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
42
+ isLink: true,
43
+ dataId: dataId
44
+ })),
45
+ container = _render4.container;
46
+
47
+ expect(container).toMatchSnapshot();
48
+ var anchor = container.querySelector('a');
49
+ expect(anchor.getAttribute('data-id')).toBe(dataId);
50
+ expect(anchor.getAttribute('data-test-id')).toBe(dataId);
51
+ });
52
+ test('renders text content', function () {
53
+ var text = 'Test Subject';
54
+
55
+ var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
56
+ text: text
57
+ })),
58
+ container = _render5.container;
59
+
60
+ expect(container.textContent).toContain(text);
61
+ });
62
+ test('renders with custom className', function () {
63
+ var customClass = 'custom-subject';
64
+
65
+ var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
66
+ className: customClass
67
+ })),
68
+ container = _render6.container;
69
+
70
+ expect(container.querySelector(".".concat(customClass))).not.toBeNull();
71
+ });
72
+ test('renders dotted text when isDotted is true', function () {
73
+ var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
74
+ text: "Test",
75
+ isDotted: true
76
+ })),
77
+ asFragment = _render7.asFragment;
78
+
79
+ expect(asFragment()).toMatchSnapshot();
80
+ });
81
+ test('renders children when provided', function () {
82
+ var _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
83
+ isLink: true
84
+ }, /*#__PURE__*/_react["default"].createElement("span", null, "Custom Child"))),
85
+ container = _render8.container;
86
+
87
+ expect(container.querySelector('span').textContent).toBe('Custom Child');
88
+ });
89
+ test('applies fontWeight prop', function () {
90
+ var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
91
+ text: "Test",
92
+ fontWeight: "bold"
93
+ })),
94
+ asFragment = _render9.asFragment;
95
+
96
+ expect(asFragment()).toMatchSnapshot();
97
+ });
98
+ test('renders with href when isLink is true', function () {
99
+ var href = 'https://example.com';
100
+
101
+ var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
102
+ isLink: true,
103
+ href: href
104
+ })),
105
+ container = _render10.container;
106
+
107
+ expect(container.querySelector('a').getAttribute('href')).toBe(href);
108
+ });
109
+ test('calls onClick when link is clicked', function () {
110
+ var handleClick = jest.fn();
111
+
112
+ var _render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
113
+ isLink: true,
114
+ onClick: handleClick
115
+ })),
116
+ container = _render11.container;
117
+
118
+ container.querySelector('a').click();
119
+ expect(handleClick).toHaveBeenCalled();
120
+ });
121
+ test('renders as non-link when isLink is false', function () {
122
+ var _render12 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
123
+ text: "Test",
124
+ isLink: false
125
+ })),
126
+ container = _render12.container;
127
+
128
+ expect(container.querySelector('a')).toBeNull();
129
+ });
130
+ test('applies custom className to non-link element', function () {
131
+ var customClass = 'test-class';
132
+
133
+ var _render13 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
134
+ text: "Test",
135
+ className: customClass,
136
+ isLink: false
137
+ })),
138
+ container = _render13.container;
139
+
140
+ expect(container.querySelector(".".concat(customClass))).not.toBeNull();
141
+ });
142
+ test('renders with target prop on link', function () {
143
+ var _render14 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
144
+ isLink: true,
145
+ target: "_blank"
146
+ })),
147
+ container = _render14.container;
148
+
149
+ expect(container.querySelector('a').getAttribute('target')).toBe('_blank');
150
+ });
27
151
  });
@@ -1,5 +1,17 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Subject applies fontWeight prop 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="dotted font_bold subject whiteSpace_pre"
7
+ data-title="Test"
8
+ data-title-wrap="pre"
9
+ >
10
+ Test
11
+ </div>
12
+ </DocumentFragment>
13
+ `;
14
+
3
15
  exports[`Subject rendering the defult props 1`] = `
4
16
  <DocumentFragment>
5
17
  <div
@@ -18,6 +30,21 @@ exports[`Subject rendering the whiteSpace of -break-spaces 1`] = `
18
30
  </DocumentFragment>
19
31
  `;
20
32
 
33
+ exports[`Subject rendering the whiteSpace of -break-spaces 2`] = `
34
+ <DocumentFragment>
35
+ <a
36
+ class="container "
37
+ href="javascript:void(0);"
38
+ rel="noopener noreferrer"
39
+ >
40
+ <div
41
+ class="dotted font_regular subject whiteSpace_breakSpaces cursorPointer"
42
+ data-title-wrap="break-spaces"
43
+ />
44
+ </a>
45
+ </DocumentFragment>
46
+ `;
47
+
21
48
  exports[`Subject rendering the whiteSpace of -normal 1`] = `
22
49
  <DocumentFragment>
23
50
  <div
@@ -27,6 +54,21 @@ exports[`Subject rendering the whiteSpace of -normal 1`] = `
27
54
  </DocumentFragment>
28
55
  `;
29
56
 
57
+ exports[`Subject rendering the whiteSpace of -normal 2`] = `
58
+ <DocumentFragment>
59
+ <a
60
+ class="container "
61
+ href="javascript:void(0);"
62
+ rel="noopener noreferrer"
63
+ >
64
+ <div
65
+ class="dotted font_regular subject whiteSpace_normal cursorPointer"
66
+ data-title-wrap="normal"
67
+ />
68
+ </a>
69
+ </DocumentFragment>
70
+ `;
71
+
30
72
  exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
31
73
  <DocumentFragment>
32
74
  <div
@@ -36,6 +78,21 @@ exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
36
78
  </DocumentFragment>
37
79
  `;
38
80
 
81
+ exports[`Subject rendering the whiteSpace of -nowrap 2`] = `
82
+ <DocumentFragment>
83
+ <a
84
+ class="container "
85
+ href="javascript:void(0);"
86
+ rel="noopener noreferrer"
87
+ >
88
+ <div
89
+ class="dotted font_regular subject whiteSpace_nowrap cursorPointer"
90
+ data-title-wrap="nowrap"
91
+ />
92
+ </a>
93
+ </DocumentFragment>
94
+ `;
95
+
39
96
  exports[`Subject rendering the whiteSpace of -pre 1`] = `
40
97
  <DocumentFragment>
41
98
  <div
@@ -45,6 +102,21 @@ exports[`Subject rendering the whiteSpace of -pre 1`] = `
45
102
  </DocumentFragment>
46
103
  `;
47
104
 
105
+ exports[`Subject rendering the whiteSpace of -pre 2`] = `
106
+ <DocumentFragment>
107
+ <a
108
+ class="container "
109
+ href="javascript:void(0);"
110
+ rel="noopener noreferrer"
111
+ >
112
+ <div
113
+ class="dotted font_regular subject whiteSpace_pre cursorPointer"
114
+ data-title-wrap="pre"
115
+ />
116
+ </a>
117
+ </DocumentFragment>
118
+ `;
119
+
48
120
  exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
49
121
  <DocumentFragment>
50
122
  <div
@@ -54,6 +126,21 @@ exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
54
126
  </DocumentFragment>
55
127
  `;
56
128
 
129
+ exports[`Subject rendering the whiteSpace of -pre-line 2`] = `
130
+ <DocumentFragment>
131
+ <a
132
+ class="container "
133
+ href="javascript:void(0);"
134
+ rel="noopener noreferrer"
135
+ >
136
+ <div
137
+ class="dotted font_regular subject whiteSpace_preLine cursorPointer"
138
+ data-title-wrap="pre-line"
139
+ />
140
+ </a>
141
+ </DocumentFragment>
142
+ `;
143
+
57
144
  exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
58
145
  <DocumentFragment>
59
146
  <div
@@ -62,3 +149,47 @@ exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
62
149
  />
63
150
  </DocumentFragment>
64
151
  `;
152
+
153
+ exports[`Subject rendering the whiteSpace of -pre-wrap 2`] = `
154
+ <DocumentFragment>
155
+ <a
156
+ class="container "
157
+ href="javascript:void(0);"
158
+ rel="noopener noreferrer"
159
+ >
160
+ <div
161
+ class="dotted font_regular subject whiteSpace_preWrap cursorPointer"
162
+ data-title-wrap="pre-wrap"
163
+ />
164
+ </a>
165
+ </DocumentFragment>
166
+ `;
167
+
168
+ exports[`Subject renders data attributes on link wrapper 1`] = `
169
+ <div>
170
+ <a
171
+ class="container "
172
+ data-id="subject-id"
173
+ data-test-id="subject-id"
174
+ href="javascript:void(0);"
175
+ rel="noopener noreferrer"
176
+ >
177
+ <div
178
+ class="dotted font_regular subject whiteSpace_pre cursorPointer"
179
+ data-title-wrap="pre"
180
+ />
181
+ </a>
182
+ </div>
183
+ `;
184
+
185
+ exports[`Subject renders dotted text when isDotted is true 1`] = `
186
+ <DocumentFragment>
187
+ <div
188
+ class="dotted font_regular subject whiteSpace_pre"
189
+ data-title="Test"
190
+ data-title-wrap="pre"
191
+ >
192
+ Test
193
+ </div>
194
+ </DocumentFragment>
195
+ `;
@@ -4,14 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultProps = void 0;
7
+
8
+ var _constants = require("@zohodesk/dotkit/es/utils/constants");
9
+
7
10
  var defaultProps = {
8
11
  isLink: false,
9
12
  fontWeight: 'regular',
10
13
  className: '',
11
14
  isDotted: true,
12
- customProps: {},
15
+ customProps: _constants.DUMMY_OBJECT,
13
16
  whiteSpace: 'pre',
14
17
  isHighlighted: false,
15
- highlightData: {}
18
+ highlightData: _constants.DUMMY_OBJECT
16
19
  };
17
20
  exports.defaultProps = defaultProps;
@@ -41,7 +41,7 @@
41
41
  .classic .floatingIconContainer {
42
42
  display: none;
43
43
  }
44
-
44
+ /*Active:ignore*/
45
45
  .compact .floatingIconContainer,
46
46
  .superCompact .floatingIconContainer,
47
47
  .listContainer:hover .classic .floatingIconContainer,
@@ -69,7 +69,7 @@
69
69
  position: relative;
70
70
  transition: var(--zd_transition3) all ease;
71
71
  }
72
-
72
+ /*Active:ignore*/
73
73
  .listContainer:hover .compact .floatingIconContainer,
74
74
  .listContainer:hover .superCompact .floatingIconContainer,
75
75
  .hoveredStyle .compact .floatingIconContainer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -69,7 +69,7 @@
69
69
  "@zohodesk-private/react-prop-validator": "1.2.3",
70
70
  "@zohodesk/a11y": "2.3.8",
71
71
  "@zohodesk/components": "1.6.3",
72
- "@zohodesk/hooks": "2.0.6",
72
+ "@zohodesk/hooks": "2.0.8",
73
73
  "@zohodesk/icons": "1.2.4",
74
74
  "@zohodesk/layout": "^3.1.0",
75
75
  "@zohodesk/svg": "1.3.2",
@@ -90,7 +90,7 @@
90
90
  "@zohodesk/svg": "1.3.2",
91
91
  "@zohodesk/virtualizer": "1.0.13",
92
92
  "react-sortable-hoc": "^0.8.3",
93
- "@zohodesk/hooks": "2.0.6",
93
+ "@zohodesk/hooks": "2.0.8",
94
94
  "@zohodesk/utils": "1.3.16",
95
95
  "@zohodesk/a11y": "2.3.8",
96
96
  "@zohodesk/layout": "3.1.0"