@zohodesk/components 1.6.5 → 1.6.7-exp-0
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 +16 -1
- package/es/Avatar/Avatar.module.css +8 -8
- package/es/AvatarTeam/AvatarTeam.module.css +30 -30
- package/es/Button/css/Button.module.css +19 -19
- package/es/Buttongroup/Buttongroup.module.css +3 -5
- package/es/Card/Card.module.css +6 -4
- package/es/DateTime/DateWidget.module.css +1 -1
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +2 -2
- package/es/DropDown/DropDownHeading.module.css +4 -4
- package/es/DropDown/DropDownItem.module.css +4 -4
- package/es/DropDown/DropDownSearch.module.css +3 -3
- package/es/Label/Label.module.css +5 -5
- package/es/ListItem/ListItem.module.css +19 -30
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
- package/es/Radio/Radio.module.css +8 -9
- package/es/Ribbon/Ribbon.module.css +16 -19
- package/es/RippleEffect/RippleEffect.module.css +55 -17
- package/es/Stencils/Stencils.module.css +30 -14
- package/es/Tag/Tag.module.css +17 -18
- package/es/TextBox/TextBox.module.css +9 -9
- package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/es/Textarea/Textarea.module.css +18 -18
- package/es/Tooltip/Tooltip.module.css +2 -2
- package/es/Typography/Typography.js +18 -8
- package/es/Typography/__tests__/Typography.spec.js +198 -6
- package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +1235 -2
- package/es/Typography/css/Typography.module.css +4 -0
- package/es/Typography/css/cssJSLogic.js +53 -21
- package/es/Typography/props/defaultProps.js +4 -3
- package/es/Typography/props/propTypes.js +68 -26
- package/es/Typography/utils/textHighlighter.js +2 -2
- package/es/common/avatarsizes.module.css +16 -16
- package/es/shared/InputFieldLine/InputFieldLine.module.css +2 -2
- package/es/v1/Switch/css/Switch_v1.module.css +28 -28
- package/lib/Avatar/Avatar.module.css +8 -8
- package/lib/AvatarTeam/AvatarTeam.module.css +30 -30
- package/lib/Button/css/Button.module.css +19 -19
- package/lib/Buttongroup/Buttongroup.module.css +3 -5
- package/lib/Card/Card.module.css +6 -4
- package/lib/DateTime/DateWidget.module.css +1 -1
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +2 -2
- package/lib/DropDown/DropDownHeading.module.css +4 -4
- package/lib/DropDown/DropDownItem.module.css +4 -4
- package/lib/DropDown/DropDownSearch.module.css +3 -3
- package/lib/Label/Label.module.css +5 -5
- package/lib/ListItem/ListItem.module.css +19 -30
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
- package/lib/Radio/Radio.module.css +8 -9
- package/lib/Ribbon/Ribbon.module.css +16 -19
- package/lib/RippleEffect/RippleEffect.module.css +55 -17
- package/lib/Stencils/Stencils.module.css +30 -14
- package/lib/Tag/Tag.module.css +17 -18
- package/lib/TextBox/TextBox.module.css +9 -9
- package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/lib/Textarea/Textarea.module.css +18 -18
- package/lib/Tooltip/Tooltip.module.css +2 -2
- package/lib/Typography/Typography.js +15 -5
- package/lib/Typography/__tests__/Typography.spec.js +284 -92
- package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +1235 -2
- package/lib/Typography/css/Typography.module.css +4 -0
- package/lib/Typography/css/cssJSLogic.js +38 -6
- package/lib/Typography/props/defaultProps.js +6 -3
- package/lib/Typography/props/propTypes.js +67 -23
- package/lib/Typography/utils/textHighlighter.js +3 -3
- package/lib/common/avatarsizes.module.css +16 -16
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +2 -2
- package/lib/v1/Switch/css/Switch_v1.module.css +28 -28
- package/package.json +15 -12
- package/_react-cli.config.js +0 -24
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +0 -467
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +0 -36
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +0 -467
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +0 -36
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +0 -467
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +0 -36
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +0 -467
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +0 -36
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +0 -467
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +0 -36
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +0 -467
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +0 -36
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +0 -467
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +0 -36
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +0 -467
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +0 -36
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +0 -467
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +0 -36
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +0 -467
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +0 -36
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +0 -467
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +0 -36
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +0 -467
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +0 -36
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +0 -467
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +0 -36
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +0 -467
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +0 -36
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +0 -467
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +0 -36
- package/assets/Contrast/darkContrastLightness.module.css +0 -39
- package/assets/Contrast/lightContrastLightness.module.css +0 -39
- package/assets/Contrast/pureDarkContrastLightness.module.css +0 -39
|
@@ -23,7 +23,7 @@ describe('Typography', function () {
|
|
|
23
23
|
var ui_decoration = ['default', 'underline', 'strike', 'overline'];
|
|
24
24
|
var ui_wordBreak = ['breakAll', 'keepAll', 'breakWord'];
|
|
25
25
|
var ui_wordWrap = ['normal', 'break'];
|
|
26
|
-
var ui_whiteSpace = ['normal', 'noWrap', 'pre', 'preLine', 'preWrap'];
|
|
26
|
+
var ui_whiteSpace = ['normal', 'noWrap', 'pre', 'preLine', 'preWrap', 'breakSpaces'];
|
|
27
27
|
test('rendering the defult props', function () {
|
|
28
28
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], null)),
|
|
29
29
|
asFragment = _render.asFragment;
|
|
@@ -44,197 +44,376 @@ describe('Typography', function () {
|
|
|
44
44
|
|
|
45
45
|
expect(asFragment()).toMatchSnapshot();
|
|
46
46
|
});
|
|
47
|
-
test('rendering
|
|
47
|
+
test('rendering h2 tag name with using as', function () {
|
|
48
48
|
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
49
|
-
|
|
49
|
+
as: "h2"
|
|
50
50
|
}, "Heading 2 Test")),
|
|
51
51
|
asFragment = _render4.asFragment;
|
|
52
52
|
|
|
53
53
|
expect(asFragment()).toMatchSnapshot();
|
|
54
54
|
});
|
|
55
|
-
test('rendering
|
|
55
|
+
test('rendering i18n_dataTitle', function () {
|
|
56
56
|
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
57
|
-
|
|
57
|
+
$i18n_dataTitle: "typoDataTitle"
|
|
58
58
|
}, "Heading 2 Test")),
|
|
59
59
|
asFragment = _render5.asFragment;
|
|
60
60
|
|
|
61
61
|
expect(asFragment()).toMatchSnapshot();
|
|
62
62
|
});
|
|
63
|
-
test('rendering
|
|
63
|
+
test('rendering dataTitle', function () {
|
|
64
64
|
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
65
|
-
|
|
65
|
+
dataTitle: "typoDataTitle"
|
|
66
66
|
}, "Heading 2 Test")),
|
|
67
67
|
asFragment = _render6.asFragment;
|
|
68
68
|
|
|
69
69
|
expect(asFragment()).toMatchSnapshot();
|
|
70
70
|
});
|
|
71
|
-
test('rendering
|
|
71
|
+
test('rendering testId', function () {
|
|
72
72
|
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
73
|
+
testId: "TypoTestId"
|
|
74
|
+
}, "Heading 2 Test")),
|
|
75
|
+
asFragment = _render7.asFragment;
|
|
76
|
+
|
|
77
|
+
expect(asFragment()).toMatchSnapshot();
|
|
78
|
+
});
|
|
79
|
+
test('rendering customId', function () {
|
|
80
|
+
var _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
81
|
+
customId: "TypoCustomId"
|
|
82
|
+
}, "Heading 2 Test")),
|
|
83
|
+
asFragment = _render8.asFragment;
|
|
84
|
+
|
|
85
|
+
expect(asFragment()).toMatchSnapshot();
|
|
86
|
+
});
|
|
87
|
+
test('rendering tagAttributes_text', function () {
|
|
88
|
+
var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
73
89
|
$tagAttributes_text: {
|
|
74
90
|
id: "TypoCustomId"
|
|
75
91
|
}
|
|
76
92
|
}, "Heading 2 Test")),
|
|
77
|
-
asFragment =
|
|
93
|
+
asFragment = _render9.asFragment;
|
|
94
|
+
|
|
95
|
+
expect(asFragment()).toMatchSnapshot();
|
|
96
|
+
});
|
|
97
|
+
test('rendering tagAttributes', function () {
|
|
98
|
+
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
99
|
+
tagAttributes: {
|
|
100
|
+
id: "TypoCustomId"
|
|
101
|
+
}
|
|
102
|
+
}, "Heading 2 Test")),
|
|
103
|
+
asFragment = _render10.asFragment;
|
|
78
104
|
|
|
79
105
|
expect(asFragment()).toMatchSnapshot();
|
|
80
106
|
});
|
|
81
107
|
test('rendering a11yAttributes_text', function () {
|
|
82
|
-
var
|
|
108
|
+
var _render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
83
109
|
$a11yAttributes_text: {
|
|
84
110
|
'aria-haspopup': 'true',
|
|
85
111
|
'aria-expanded': true,
|
|
86
112
|
'aria-controls': 'uniqueId'
|
|
87
113
|
}
|
|
88
114
|
}, "Heading 2 Test")),
|
|
89
|
-
asFragment =
|
|
115
|
+
asFragment = _render11.asFragment;
|
|
116
|
+
|
|
117
|
+
expect(asFragment()).toMatchSnapshot();
|
|
118
|
+
});
|
|
119
|
+
test('rendering a11yAttributes', function () {
|
|
120
|
+
var _render12 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
121
|
+
a11yAttributes: {
|
|
122
|
+
'aria-haspopup': 'true',
|
|
123
|
+
'aria-expanded': true,
|
|
124
|
+
'aria-controls': 'uniqueId'
|
|
125
|
+
}
|
|
126
|
+
}, "Heading 2 Test")),
|
|
127
|
+
asFragment = _render12.asFragment;
|
|
90
128
|
|
|
91
129
|
expect(asFragment()).toMatchSnapshot();
|
|
92
130
|
});
|
|
93
131
|
test('rendering flag_reset', function () {
|
|
94
|
-
var
|
|
132
|
+
var _render13 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
95
133
|
$flag_reset: true
|
|
96
134
|
}, "Heading 2 Test")),
|
|
97
|
-
asFragment =
|
|
135
|
+
asFragment = _render13.asFragment;
|
|
136
|
+
|
|
137
|
+
expect(asFragment()).toMatchSnapshot();
|
|
138
|
+
});
|
|
139
|
+
test('rendering shouldReset', function () {
|
|
140
|
+
var _render14 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
141
|
+
shouldReset: true
|
|
142
|
+
}, "Heading 2 Test")),
|
|
143
|
+
asFragment = _render14.asFragment;
|
|
98
144
|
|
|
99
145
|
expect(asFragment()).toMatchSnapshot();
|
|
100
146
|
});
|
|
101
147
|
test('rendering flag_dotted', function () {
|
|
102
|
-
var
|
|
148
|
+
var _render15 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
103
149
|
$flag_dotted: true
|
|
104
150
|
}, "Heading 2 Test")),
|
|
105
|
-
asFragment =
|
|
151
|
+
asFragment = _render15.asFragment;
|
|
152
|
+
|
|
153
|
+
expect(asFragment()).toMatchSnapshot();
|
|
154
|
+
});
|
|
155
|
+
test('rendering isDotted', function () {
|
|
156
|
+
var _render16 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
157
|
+
isDotted: true
|
|
158
|
+
}, "Heading 2 Test")),
|
|
159
|
+
asFragment = _render16.asFragment;
|
|
106
160
|
|
|
107
161
|
expect(asFragment()).toMatchSnapshot();
|
|
108
162
|
});
|
|
109
163
|
test.each(ui_size)('Should render ui_size - %s', function (ui_size) {
|
|
110
|
-
var
|
|
164
|
+
var _render17 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
111
165
|
isScrollAttribute: true,
|
|
112
166
|
$ui_size: ui_size
|
|
113
167
|
}, "Heading")),
|
|
114
|
-
asFragment =
|
|
168
|
+
asFragment = _render17.asFragment;
|
|
169
|
+
|
|
170
|
+
expect(asFragment()).toMatchSnapshot();
|
|
171
|
+
});
|
|
172
|
+
test.each(ui_size)('Should render size - %s', function (size) {
|
|
173
|
+
var _render18 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
174
|
+
isScrollAttribute: true,
|
|
175
|
+
size: size
|
|
176
|
+
}, "Heading")),
|
|
177
|
+
asFragment = _render18.asFragment;
|
|
115
178
|
|
|
116
179
|
expect(asFragment()).toMatchSnapshot();
|
|
117
180
|
});
|
|
118
181
|
test.each(ui_lineClamp)('Should render ui_lineClamp - %s', function (ui_lineClamp) {
|
|
119
|
-
var
|
|
182
|
+
var _render19 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
120
183
|
isScrollAttribute: true,
|
|
121
184
|
$ui_lineClamp: ui_lineClamp
|
|
122
185
|
}, "Heading")),
|
|
123
|
-
asFragment =
|
|
186
|
+
asFragment = _render19.asFragment;
|
|
187
|
+
|
|
188
|
+
expect(asFragment()).toMatchSnapshot();
|
|
189
|
+
});
|
|
190
|
+
test.each(ui_lineClamp)('Should render lineClamp - %s', function (lineClamp) {
|
|
191
|
+
var _render20 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
192
|
+
isScrollAttribute: true,
|
|
193
|
+
lineClamp: lineClamp
|
|
194
|
+
}, "Heading")),
|
|
195
|
+
asFragment = _render20.asFragment;
|
|
124
196
|
|
|
125
197
|
expect(asFragment()).toMatchSnapshot();
|
|
126
198
|
});
|
|
127
199
|
test.each(ui_lineHeight)('Should render ui_lineHeight - %s', function (ui_lineHeight) {
|
|
128
|
-
var
|
|
200
|
+
var _render21 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
129
201
|
isScrollAttribute: true,
|
|
130
202
|
$ui_lineHeight: ui_lineHeight
|
|
131
203
|
}, "Heading")),
|
|
132
|
-
asFragment =
|
|
204
|
+
asFragment = _render21.asFragment;
|
|
205
|
+
|
|
206
|
+
expect(asFragment()).toMatchSnapshot();
|
|
207
|
+
});
|
|
208
|
+
test.each(ui_lineHeight)('Should render lineHeight - %s', function (lineHeight) {
|
|
209
|
+
var _render22 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
210
|
+
isScrollAttribute: true,
|
|
211
|
+
lineHeight: lineHeight
|
|
212
|
+
}, "Heading")),
|
|
213
|
+
asFragment = _render22.asFragment;
|
|
133
214
|
|
|
134
215
|
expect(asFragment()).toMatchSnapshot();
|
|
135
216
|
});
|
|
136
217
|
test.each(ui_display)('Should render ui_display - %s', function (ui_display) {
|
|
137
|
-
var
|
|
218
|
+
var _render23 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
138
219
|
isScrollAttribute: true,
|
|
139
220
|
$ui_display: ui_display
|
|
140
221
|
}, "Heading")),
|
|
141
|
-
asFragment =
|
|
222
|
+
asFragment = _render23.asFragment;
|
|
223
|
+
|
|
224
|
+
expect(asFragment()).toMatchSnapshot();
|
|
225
|
+
});
|
|
226
|
+
test.each(ui_display)('Should render display - %s', function (display) {
|
|
227
|
+
var _render24 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
228
|
+
isScrollAttribute: true,
|
|
229
|
+
display: display
|
|
230
|
+
}, "Heading")),
|
|
231
|
+
asFragment = _render24.asFragment;
|
|
142
232
|
|
|
143
233
|
expect(asFragment()).toMatchSnapshot();
|
|
144
234
|
});
|
|
145
235
|
test.each(ui_weight)('Should render ui_weight - %s', function (ui_weight) {
|
|
146
|
-
var
|
|
236
|
+
var _render25 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
147
237
|
isScrollAttribute: true,
|
|
148
238
|
$ui_weight: ui_weight
|
|
149
239
|
}, "Heading")),
|
|
150
|
-
asFragment =
|
|
240
|
+
asFragment = _render25.asFragment;
|
|
241
|
+
|
|
242
|
+
expect(asFragment()).toMatchSnapshot();
|
|
243
|
+
});
|
|
244
|
+
test.each(ui_weight)('Should render weight - %s', function (weight) {
|
|
245
|
+
var _render26 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
246
|
+
isScrollAttribute: true,
|
|
247
|
+
weight: weight
|
|
248
|
+
}, "Heading")),
|
|
249
|
+
asFragment = _render26.asFragment;
|
|
151
250
|
|
|
152
251
|
expect(asFragment()).toMatchSnapshot();
|
|
153
252
|
});
|
|
154
253
|
test.each(ui_typeFace)('Should render ui_typeFace - %s', function (ui_typeFace) {
|
|
155
|
-
var
|
|
254
|
+
var _render27 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
156
255
|
isScrollAttribute: true,
|
|
157
256
|
$ui_typeFace: ui_typeFace
|
|
158
257
|
}, "Heading")),
|
|
159
|
-
asFragment =
|
|
258
|
+
asFragment = _render27.asFragment;
|
|
259
|
+
|
|
260
|
+
expect(asFragment()).toMatchSnapshot();
|
|
261
|
+
});
|
|
262
|
+
test.each(ui_typeFace)('Should render typeFace - %s', function (typeFace) {
|
|
263
|
+
var _render28 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
264
|
+
isScrollAttribute: true,
|
|
265
|
+
typeFace: typeFace
|
|
266
|
+
}, "Heading")),
|
|
267
|
+
asFragment = _render28.asFragment;
|
|
160
268
|
|
|
161
269
|
expect(asFragment()).toMatchSnapshot();
|
|
162
270
|
});
|
|
163
271
|
test.each(ui_textAlign)('Should render ui_textAlign - %s', function (ui_textAlign) {
|
|
164
|
-
var
|
|
272
|
+
var _render29 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
165
273
|
isScrollAttribute: true,
|
|
166
274
|
$ui_textAlign: ui_textAlign
|
|
167
275
|
}, "Heading")),
|
|
168
|
-
asFragment =
|
|
276
|
+
asFragment = _render29.asFragment;
|
|
277
|
+
|
|
278
|
+
expect(asFragment()).toMatchSnapshot();
|
|
279
|
+
});
|
|
280
|
+
test.each(ui_textAlign)('Should render textAlign - %s', function (textAlign) {
|
|
281
|
+
var _render30 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
282
|
+
isScrollAttribute: true,
|
|
283
|
+
textAlign: textAlign
|
|
284
|
+
}, "Heading")),
|
|
285
|
+
asFragment = _render30.asFragment;
|
|
169
286
|
|
|
170
287
|
expect(asFragment()).toMatchSnapshot();
|
|
171
288
|
});
|
|
172
289
|
test.each(ui_letterSpacing)('Should render ui_letterSpacing - %s', function (ui_letterSpacing) {
|
|
173
|
-
var
|
|
290
|
+
var _render31 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
174
291
|
isScrollAttribute: true,
|
|
175
292
|
$ui_letterSpacing: ui_letterSpacing
|
|
176
293
|
}, "Heading")),
|
|
177
|
-
asFragment =
|
|
294
|
+
asFragment = _render31.asFragment;
|
|
295
|
+
|
|
296
|
+
expect(asFragment()).toMatchSnapshot();
|
|
297
|
+
});
|
|
298
|
+
test.each(ui_letterSpacing)('Should render letterSpacing - %s', function (letterSpacing) {
|
|
299
|
+
var _render32 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
300
|
+
isScrollAttribute: true,
|
|
301
|
+
letterSpacing: letterSpacing
|
|
302
|
+
}, "Heading")),
|
|
303
|
+
asFragment = _render32.asFragment;
|
|
178
304
|
|
|
179
305
|
expect(asFragment()).toMatchSnapshot();
|
|
180
306
|
});
|
|
181
307
|
test.each(ui_transform)('Should render ui_transform - %s', function (ui_transform) {
|
|
182
|
-
var
|
|
308
|
+
var _render33 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
183
309
|
isScrollAttribute: true,
|
|
184
310
|
$ui_transform: ui_transform
|
|
185
311
|
}, "Heading")),
|
|
186
|
-
asFragment =
|
|
312
|
+
asFragment = _render33.asFragment;
|
|
313
|
+
|
|
314
|
+
expect(asFragment()).toMatchSnapshot();
|
|
315
|
+
});
|
|
316
|
+
test.each(ui_transform)('Should render transform - %s', function (transform) {
|
|
317
|
+
var _render34 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
318
|
+
isScrollAttribute: true,
|
|
319
|
+
transform: transform
|
|
320
|
+
}, "Heading")),
|
|
321
|
+
asFragment = _render34.asFragment;
|
|
187
322
|
|
|
188
323
|
expect(asFragment()).toMatchSnapshot();
|
|
189
324
|
});
|
|
190
325
|
test.each(ui_decoration)('Should render ui_decoration - %s', function (ui_decoration) {
|
|
191
|
-
var
|
|
326
|
+
var _render35 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
192
327
|
isScrollAttribute: true,
|
|
193
328
|
$ui_decoration: ui_decoration
|
|
194
329
|
}, "Heading")),
|
|
195
|
-
asFragment =
|
|
330
|
+
asFragment = _render35.asFragment;
|
|
331
|
+
|
|
332
|
+
expect(asFragment()).toMatchSnapshot();
|
|
333
|
+
});
|
|
334
|
+
test.each(ui_decoration)('Should render decoration - %s', function (decoration) {
|
|
335
|
+
var _render36 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
336
|
+
isScrollAttribute: true,
|
|
337
|
+
decoration: decoration
|
|
338
|
+
}, "Heading")),
|
|
339
|
+
asFragment = _render36.asFragment;
|
|
196
340
|
|
|
197
341
|
expect(asFragment()).toMatchSnapshot();
|
|
198
342
|
});
|
|
199
343
|
test('rendering ui_className', function () {
|
|
200
|
-
var
|
|
344
|
+
var _render37 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
201
345
|
$ui_className: "custom-class"
|
|
202
346
|
}, "Heading 2 Test")),
|
|
203
|
-
asFragment =
|
|
347
|
+
asFragment = _render37.asFragment;
|
|
348
|
+
|
|
349
|
+
expect(asFragment()).toMatchSnapshot();
|
|
350
|
+
});
|
|
351
|
+
test('rendering customClass', function () {
|
|
352
|
+
var _render38 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
353
|
+
customClass: "custom-class"
|
|
354
|
+
}, "Heading 2 Test")),
|
|
355
|
+
asFragment = _render38.asFragment;
|
|
204
356
|
|
|
205
357
|
expect(asFragment()).toMatchSnapshot();
|
|
206
358
|
});
|
|
207
359
|
test.each(ui_wordBreak)('Should render ui_wordBreak - %s', function (ui_wordBreak) {
|
|
208
|
-
var
|
|
360
|
+
var _render39 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
209
361
|
isScrollAttribute: true,
|
|
210
362
|
$ui_wordBreak: ui_wordBreak
|
|
211
363
|
}, "Heading")),
|
|
212
|
-
asFragment =
|
|
364
|
+
asFragment = _render39.asFragment;
|
|
365
|
+
|
|
366
|
+
expect(asFragment()).toMatchSnapshot();
|
|
367
|
+
});
|
|
368
|
+
test.each(ui_wordBreak)('Should render wordBreak - %s', function (wordBreak) {
|
|
369
|
+
var _render40 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
370
|
+
isScrollAttribute: true,
|
|
371
|
+
wordBreak: wordBreak
|
|
372
|
+
}, "Heading")),
|
|
373
|
+
asFragment = _render40.asFragment;
|
|
213
374
|
|
|
214
375
|
expect(asFragment()).toMatchSnapshot();
|
|
215
376
|
});
|
|
216
377
|
test.each(ui_wordWrap)('Should render ui_wordWrap - %s', function (ui_wordWrap) {
|
|
217
|
-
var
|
|
378
|
+
var _render41 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
218
379
|
isScrollAttribute: true,
|
|
219
380
|
$ui_wordWrap: ui_wordWrap
|
|
220
381
|
}, "Heading")),
|
|
221
|
-
asFragment =
|
|
382
|
+
asFragment = _render41.asFragment;
|
|
383
|
+
|
|
384
|
+
expect(asFragment()).toMatchSnapshot();
|
|
385
|
+
});
|
|
386
|
+
test.each(ui_wordWrap)('Should render wordWrap - %s', function (wordWrap) {
|
|
387
|
+
var _render42 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
388
|
+
isScrollAttribute: true,
|
|
389
|
+
wordWrap: wordWrap
|
|
390
|
+
}, "Heading")),
|
|
391
|
+
asFragment = _render42.asFragment;
|
|
222
392
|
|
|
223
393
|
expect(asFragment()).toMatchSnapshot();
|
|
224
394
|
});
|
|
225
395
|
test.each(ui_whiteSpace)('Should render ui_whiteSpace - %s', function (ui_whiteSpace) {
|
|
226
|
-
var
|
|
396
|
+
var _render43 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
227
397
|
isScrollAttribute: true,
|
|
228
398
|
$ui_whiteSpace: ui_whiteSpace
|
|
229
399
|
}, "Heading")),
|
|
230
|
-
asFragment =
|
|
400
|
+
asFragment = _render43.asFragment;
|
|
401
|
+
|
|
402
|
+
expect(asFragment()).toMatchSnapshot();
|
|
403
|
+
});
|
|
404
|
+
test.each(ui_whiteSpace)('Should render whiteSpace - %s', function (whiteSpace) {
|
|
405
|
+
var _render44 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
406
|
+
isScrollAttribute: true,
|
|
407
|
+
whiteSpace: whiteSpace
|
|
408
|
+
}, "Heading")),
|
|
409
|
+
asFragment = _render44.asFragment;
|
|
231
410
|
|
|
232
411
|
expect(asFragment()).toMatchSnapshot();
|
|
233
412
|
});
|
|
234
413
|
});
|
|
235
414
|
describe('Typography with highlight', function () {
|
|
236
415
|
test('should render highlighted word', function () {
|
|
237
|
-
var
|
|
416
|
+
var _render45 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
238
417
|
$ui_highlightConfig: {
|
|
239
418
|
data: ['sun'],
|
|
240
419
|
styleConfiguration: {
|
|
@@ -242,12 +421,25 @@ describe('Typography with highlight', function () {
|
|
|
242
421
|
}
|
|
243
422
|
}
|
|
244
423
|
}, "The sun was bright, the sun was warm, the sun was high in the sky.")),
|
|
245
|
-
asFragment =
|
|
424
|
+
asFragment = _render45.asFragment;
|
|
425
|
+
|
|
426
|
+
expect(asFragment()).toMatchSnapshot();
|
|
427
|
+
});
|
|
428
|
+
test('should render highlighted word with highlightConfig', function () {
|
|
429
|
+
var _render46 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
430
|
+
highlightConfig: {
|
|
431
|
+
data: ['sun'],
|
|
432
|
+
styleConfiguration: {
|
|
433
|
+
$ui_weight: 'bold'
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}, "The sun was bright, the sun was warm, the sun was high in the sky.")),
|
|
437
|
+
asFragment = _render46.asFragment;
|
|
246
438
|
|
|
247
439
|
expect(asFragment()).toMatchSnapshot();
|
|
248
440
|
});
|
|
249
441
|
test('should render highlight by Index', function () {
|
|
250
|
-
var
|
|
442
|
+
var _render47 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
251
443
|
$ui_highlightConfig: {
|
|
252
444
|
data: [{
|
|
253
445
|
text: 'sun',
|
|
@@ -262,12 +454,12 @@ describe('Typography with highlight', function () {
|
|
|
262
454
|
}
|
|
263
455
|
}
|
|
264
456
|
}, "The sun was bright, I walked under the sun, I talked under the sun.")),
|
|
265
|
-
asFragment =
|
|
457
|
+
asFragment = _render47.asFragment;
|
|
266
458
|
|
|
267
459
|
expect(asFragment()).toMatchSnapshot();
|
|
268
460
|
});
|
|
269
461
|
test('should render separate Styles per Word', function () {
|
|
270
|
-
var
|
|
462
|
+
var _render48 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
271
463
|
$ui_highlightConfig: {
|
|
272
464
|
data: [{
|
|
273
465
|
text: 'sun',
|
|
@@ -282,12 +474,12 @@ describe('Typography with highlight', function () {
|
|
|
282
474
|
}]
|
|
283
475
|
}
|
|
284
476
|
}, "The sun was bright, I walked under the sun, I talked under the sun.")),
|
|
285
|
-
asFragment =
|
|
477
|
+
asFragment = _render48.asFragment;
|
|
286
478
|
|
|
287
479
|
expect(asFragment()).toMatchSnapshot();
|
|
288
480
|
});
|
|
289
481
|
test('should render globally skip highlights at given indexes, with shouldExcludeIndices', function () {
|
|
290
|
-
var
|
|
482
|
+
var _render49 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
291
483
|
$ui_highlightConfig: {
|
|
292
484
|
data: [{
|
|
293
485
|
text: 'sun',
|
|
@@ -303,12 +495,12 @@ describe('Typography with highlight', function () {
|
|
|
303
495
|
}
|
|
304
496
|
}
|
|
305
497
|
}, "The sun was bright, the sun was warm, the sun was high in the sky.")),
|
|
306
|
-
asFragment =
|
|
498
|
+
asFragment = _render49.asFragment;
|
|
307
499
|
|
|
308
500
|
expect(asFragment()).toMatchSnapshot();
|
|
309
501
|
});
|
|
310
502
|
test('should render with separate excluded index option per word', function () {
|
|
311
|
-
var
|
|
503
|
+
var _render50 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
312
504
|
$ui_highlightConfig: {
|
|
313
505
|
data: [{
|
|
314
506
|
text: 'sun',
|
|
@@ -325,43 +517,43 @@ describe('Typography with highlight', function () {
|
|
|
325
517
|
}
|
|
326
518
|
}
|
|
327
519
|
}, "The sun was bright, the moon was bright, the sun and moon again.")),
|
|
328
|
-
asFragment =
|
|
520
|
+
asFragment = _render50.asFragment;
|
|
329
521
|
|
|
330
522
|
expect(asFragment()).toMatchSnapshot();
|
|
331
523
|
});
|
|
332
|
-
test('should render with global
|
|
333
|
-
var
|
|
524
|
+
test('should render with global tag name applied to all highlights', function () {
|
|
525
|
+
var _render51 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
334
526
|
$ui_highlightConfig: {
|
|
335
527
|
data: [{
|
|
336
528
|
text: 'sun'
|
|
337
529
|
}, {
|
|
338
530
|
text: 'moon'
|
|
339
531
|
}],
|
|
340
|
-
|
|
532
|
+
as: 'i'
|
|
341
533
|
}
|
|
342
534
|
}, "The sun and moon were bright.")),
|
|
343
|
-
asFragment =
|
|
535
|
+
asFragment = _render51.asFragment;
|
|
344
536
|
|
|
345
537
|
expect(asFragment()).toMatchSnapshot();
|
|
346
538
|
});
|
|
347
|
-
test('should render with separate
|
|
348
|
-
var
|
|
539
|
+
test('should render with separate tag name for each highlighted word', function () {
|
|
540
|
+
var _render52 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
349
541
|
$ui_highlightConfig: {
|
|
350
542
|
data: [{
|
|
351
543
|
text: 'sun',
|
|
352
|
-
|
|
544
|
+
as: 'i'
|
|
353
545
|
}, {
|
|
354
546
|
text: 'moon',
|
|
355
|
-
|
|
547
|
+
as: 'u'
|
|
356
548
|
}]
|
|
357
549
|
}
|
|
358
550
|
}, "The sun and moon were bright.")),
|
|
359
|
-
asFragment =
|
|
551
|
+
asFragment = _render52.asFragment;
|
|
360
552
|
|
|
361
553
|
expect(asFragment()).toMatchSnapshot();
|
|
362
554
|
});
|
|
363
555
|
test('should render with global case-sensitive option', function () {
|
|
364
|
-
var
|
|
556
|
+
var _render53 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
365
557
|
$ui_highlightConfig: {
|
|
366
558
|
data: [{
|
|
367
559
|
text: 'Sun'
|
|
@@ -375,12 +567,12 @@ describe('Typography with highlight', function () {
|
|
|
375
567
|
isCaseSensitive: true
|
|
376
568
|
}
|
|
377
569
|
}, "The Sun was bright, the moon was bright, the sun was warm.")),
|
|
378
|
-
asFragment =
|
|
570
|
+
asFragment = _render53.asFragment;
|
|
379
571
|
|
|
380
572
|
expect(asFragment()).toMatchSnapshot();
|
|
381
573
|
});
|
|
382
574
|
test('should render with separate case-sensitive option per word', function () {
|
|
383
|
-
var
|
|
575
|
+
var _render54 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
384
576
|
$ui_highlightConfig: {
|
|
385
577
|
data: [{
|
|
386
578
|
text: 'Sun',
|
|
@@ -395,12 +587,12 @@ describe('Typography with highlight', function () {
|
|
|
395
587
|
}
|
|
396
588
|
}
|
|
397
589
|
}, "The Sun was bright, the Moon was bright, the sun was warm.")),
|
|
398
|
-
asFragment =
|
|
590
|
+
asFragment = _render54.asFragment;
|
|
399
591
|
|
|
400
592
|
expect(asFragment()).toMatchSnapshot();
|
|
401
593
|
});
|
|
402
594
|
test('should render with global whole-word match only', function () {
|
|
403
|
-
var
|
|
595
|
+
var _render55 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
404
596
|
$ui_highlightConfig: {
|
|
405
597
|
data: [{
|
|
406
598
|
text: 'Sun'
|
|
@@ -414,12 +606,12 @@ describe('Typography with highlight', function () {
|
|
|
414
606
|
isWholeWord: true
|
|
415
607
|
}
|
|
416
608
|
}, "Sunflower is a flower. The Sun was bright, the moonlight was bright.")),
|
|
417
|
-
asFragment =
|
|
609
|
+
asFragment = _render55.asFragment;
|
|
418
610
|
|
|
419
611
|
expect(asFragment()).toMatchSnapshot();
|
|
420
612
|
});
|
|
421
613
|
test('should render with separate whole-word option per word', function () {
|
|
422
|
-
var
|
|
614
|
+
var _render56 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
423
615
|
$ui_highlightConfig: {
|
|
424
616
|
data: [{
|
|
425
617
|
text: 'Sun',
|
|
@@ -434,12 +626,12 @@ describe('Typography with highlight', function () {
|
|
|
434
626
|
}
|
|
435
627
|
}
|
|
436
628
|
}, "Sunflower is a flower. The Sun was bright, the moonlight was bright.")),
|
|
437
|
-
asFragment =
|
|
629
|
+
asFragment = _render56.asFragment;
|
|
438
630
|
|
|
439
631
|
expect(asFragment()).toMatchSnapshot();
|
|
440
632
|
});
|
|
441
633
|
test('should render with global custom style for all highlights', function () {
|
|
442
|
-
var
|
|
634
|
+
var _render57 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
443
635
|
$ui_highlightConfig: {
|
|
444
636
|
data: [{
|
|
445
637
|
text: 'Sun'
|
|
@@ -453,12 +645,12 @@ describe('Typography with highlight', function () {
|
|
|
453
645
|
}
|
|
454
646
|
}
|
|
455
647
|
}, "The sun and moon were bright.")),
|
|
456
|
-
asFragment =
|
|
648
|
+
asFragment = _render57.asFragment;
|
|
457
649
|
|
|
458
650
|
expect(asFragment()).toMatchSnapshot();
|
|
459
651
|
});
|
|
460
652
|
test('should render with separate custom style per word', function () {
|
|
461
|
-
var
|
|
653
|
+
var _render58 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
462
654
|
$ui_highlightConfig: {
|
|
463
655
|
data: [{
|
|
464
656
|
text: 'Sun',
|
|
@@ -477,12 +669,12 @@ describe('Typography with highlight', function () {
|
|
|
477
669
|
}]
|
|
478
670
|
}
|
|
479
671
|
}, "The sun and moon were bright.")),
|
|
480
|
-
asFragment =
|
|
672
|
+
asFragment = _render58.asFragment;
|
|
481
673
|
|
|
482
674
|
expect(asFragment()).toMatchSnapshot();
|
|
483
675
|
});
|
|
484
676
|
test('should render with global custom class for all highlights', function () {
|
|
485
|
-
var
|
|
677
|
+
var _render59 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
486
678
|
$ui_highlightConfig: {
|
|
487
679
|
data: [{
|
|
488
680
|
text: 'Sun'
|
|
@@ -494,12 +686,12 @@ describe('Typography with highlight', function () {
|
|
|
494
686
|
}
|
|
495
687
|
}
|
|
496
688
|
}, "The sun and moon were bright.")),
|
|
497
|
-
asFragment =
|
|
689
|
+
asFragment = _render59.asFragment;
|
|
498
690
|
|
|
499
691
|
expect(asFragment()).toMatchSnapshot();
|
|
500
692
|
});
|
|
501
693
|
test('should render with separate custom class for each highlighted word', function () {
|
|
502
|
-
var
|
|
694
|
+
var _render60 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
503
695
|
$ui_highlightConfig: {
|
|
504
696
|
data: [{
|
|
505
697
|
text: 'Sun',
|
|
@@ -514,12 +706,12 @@ describe('Typography with highlight', function () {
|
|
|
514
706
|
}]
|
|
515
707
|
}
|
|
516
708
|
}, "The sun and moon were bright.")),
|
|
517
|
-
asFragment =
|
|
709
|
+
asFragment = _render60.asFragment;
|
|
518
710
|
|
|
519
711
|
expect(asFragment()).toMatchSnapshot();
|
|
520
712
|
});
|
|
521
713
|
test('should render customised render the highlight element for all highlighted words', function () {
|
|
522
|
-
var
|
|
714
|
+
var _render61 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
523
715
|
$ui_highlightConfig: {
|
|
524
716
|
data: [{
|
|
525
717
|
text: 'sun'
|
|
@@ -529,12 +721,12 @@ describe('Typography with highlight', function () {
|
|
|
529
721
|
})
|
|
530
722
|
}
|
|
531
723
|
}, "The sun was bright.")),
|
|
532
|
-
asFragment =
|
|
724
|
+
asFragment = _render61.asFragment;
|
|
533
725
|
|
|
534
726
|
expect(asFragment()).toMatchSnapshot();
|
|
535
727
|
});
|
|
536
728
|
test('should render separate customised render the highlight element for each highlighted word', function () {
|
|
537
|
-
var
|
|
729
|
+
var _render62 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
538
730
|
$ui_highlightConfig: {
|
|
539
731
|
data: [{
|
|
540
732
|
text: 'Sun',
|
|
@@ -549,12 +741,12 @@ describe('Typography with highlight', function () {
|
|
|
549
741
|
}]
|
|
550
742
|
}
|
|
551
743
|
}, "The sun and moon were bright.")),
|
|
552
|
-
asFragment =
|
|
744
|
+
asFragment = _render62.asFragment;
|
|
553
745
|
|
|
554
746
|
expect(asFragment()).toMatchSnapshot();
|
|
555
747
|
});
|
|
556
748
|
test('should render for RegEx Characters check', function () {
|
|
557
|
-
var
|
|
749
|
+
var _render63 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
558
750
|
$ui_highlightConfig: {
|
|
559
751
|
data: [{
|
|
560
752
|
text: '$un'
|
|
@@ -568,12 +760,12 @@ describe('Typography with highlight', function () {
|
|
|
568
760
|
}
|
|
569
761
|
}
|
|
570
762
|
}, "The sun and moon were bright. and the m**n get sunlight from the $un, The Sun provides light to its nearby stars")),
|
|
571
|
-
asFragment =
|
|
763
|
+
asFragment = _render63.asFragment;
|
|
572
764
|
|
|
573
765
|
expect(asFragment()).toMatchSnapshot();
|
|
574
766
|
});
|
|
575
767
|
test('should render for combination of configuration check', function () {
|
|
576
|
-
var
|
|
768
|
+
var _render64 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
577
769
|
$ui_highlightConfig: {
|
|
578
770
|
data: [{
|
|
579
771
|
text: 'Sun',
|
|
@@ -589,12 +781,12 @@ describe('Typography with highlight', function () {
|
|
|
589
781
|
}
|
|
590
782
|
}
|
|
591
783
|
}, "The sun and moon were bright. and the moon get sunlight from the Sun, The Sun provides light to its nearby stars")),
|
|
592
|
-
asFragment =
|
|
784
|
+
asFragment = _render64.asFragment;
|
|
593
785
|
|
|
594
786
|
expect(asFragment()).toMatchSnapshot();
|
|
595
787
|
});
|
|
596
788
|
test('should render for priority based check - it priorities the global renderHighlight over the style configurations from the global', function () {
|
|
597
|
-
var
|
|
789
|
+
var _render65 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
598
790
|
$ui_highlightConfig: {
|
|
599
791
|
data: ['sunlight'],
|
|
600
792
|
styleConfiguration: {
|
|
@@ -609,12 +801,12 @@ describe('Typography with highlight', function () {
|
|
|
609
801
|
}
|
|
610
802
|
}
|
|
611
803
|
}, "1 Sun Moon 2 sun moon 3 sunmoon 4 SUN MOON 5 sun moon 6 sunlight moonlight")),
|
|
612
|
-
asFragment =
|
|
804
|
+
asFragment = _render65.asFragment;
|
|
613
805
|
|
|
614
806
|
expect(asFragment()).toMatchSnapshot();
|
|
615
807
|
});
|
|
616
808
|
test('should render for priority based check - it priorities the style configurations from the data object over the global renderHighlight', function () {
|
|
617
|
-
var
|
|
809
|
+
var _render66 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
618
810
|
$ui_highlightConfig: {
|
|
619
811
|
data: [{
|
|
620
812
|
text: 'sunlight',
|
|
@@ -631,12 +823,12 @@ describe('Typography with highlight', function () {
|
|
|
631
823
|
}
|
|
632
824
|
}
|
|
633
825
|
}, "1 Sun Moon 2 sun moon 3 sunmoon 4 SUN MOON 5 sun moon 6 sunlight moonlight")),
|
|
634
|
-
asFragment =
|
|
826
|
+
asFragment = _render66.asFragment;
|
|
635
827
|
|
|
636
828
|
expect(asFragment()).toMatchSnapshot();
|
|
637
829
|
});
|
|
638
830
|
test('should render for priority based check - it priorities the renderHighlight from the data object over the global renderHighlight, global style configuration and style configuration from the data object', function () {
|
|
639
|
-
var
|
|
831
|
+
var _render67 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
640
832
|
$ui_highlightConfig: {
|
|
641
833
|
data: [{
|
|
642
834
|
text: 'sunlight',
|
|
@@ -661,7 +853,7 @@ describe('Typography with highlight', function () {
|
|
|
661
853
|
}
|
|
662
854
|
}
|
|
663
855
|
}, "1 Sun Moon 2 sun moon 3 sunmoon 4 SUN MOON 5 sun moon 6 sunlight moonlight")),
|
|
664
|
-
asFragment =
|
|
856
|
+
asFragment = _render67.asFragment;
|
|
665
857
|
|
|
666
858
|
expect(asFragment()).toMatchSnapshot();
|
|
667
859
|
});
|