@cypress-design/react-testresult 1.0.0 → 1.0.1

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/dist/index.umd.js CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  var React = require('react');
4
4
  var clsx = require('clsx');
5
- var iconsRegistry = require('@cypress-design/icon-registry');
5
+ var constantsTestresult = require('@cypress-design/constants-testresult');
6
+ var reactStatusicon = require('@cypress-design/react-statusicon');
7
+ var reactIcon = require('@cypress-design/react-icon');
6
8
 
7
9
  function _interopNamespaceDefault(e) {
8
10
  var n = Object.create(null);
@@ -22,460 +24,6 @@ function _interopNamespaceDefault(e) {
22
24
  }
23
25
 
24
26
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
25
- var iconsRegistry__namespace = /*#__PURE__*/_interopNamespaceDefault(iconsRegistry);
26
-
27
- /******************************************************************************
28
- Copyright (c) Microsoft Corporation.
29
-
30
- Permission to use, copy, modify, and/or distribute this software for any
31
- purpose with or without fee is hereby granted.
32
-
33
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
34
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
36
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
37
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
38
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39
- PERFORMANCE OF THIS SOFTWARE.
40
- ***************************************************************************** */
41
- /* global Reflect, Promise, SuppressedError, Symbol */
42
-
43
-
44
- var __assign$3 = function() {
45
- __assign$3 = Object.assign || function __assign(t) {
46
- for (var s, i = 1, n = arguments.length; i < n; i++) {
47
- s = arguments[i];
48
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
49
- }
50
- return t;
51
- };
52
- return __assign$3.apply(this, arguments);
53
- };
54
-
55
- function __rest$3(s, e) {
56
- var t = {};
57
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
58
- t[p] = s[p];
59
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
60
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
61
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
62
- t[p[i]] = s[p[i]];
63
- }
64
- return t;
65
- }
66
-
67
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
68
- var e = new Error(message);
69
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
70
- };
71
-
72
- const classes = {
73
- container: 'box-border relative hover:z-10 hover:outline outline-[3px] outline-gray-50 transition-all rounded-[1px] mix-blend-darken @container/test-result my-[-1px]',
74
- row: 'box-border flex flex-col flex-nowrap items-stretch gap-y-[16px] p-[11px] border border-gray-100 hover:border-gray-300 transition-all cursor-pointer justify-start items-center @xl/test-result:px-[15px]',
75
- list: 'box-border flex justify-start items-center flex-nowrap w-[100%] h-[100%] @xl/test-result:h-[32px] gap-x-[8px]',
76
- icon: 'box-border h-[16px] w-[16px]',
77
- status_icon: 'align-top',
78
- name: {
79
- container: {
80
- column: 'box-border flex flex-nowrap flex-col @xl/test-result:flex-row gap-x-[4px] @xl/test-result:items-center shrink grow h-[100%] overflow-hidden',
81
- describes: 'box-border flex flex-nowrap gap-x-[2px] @xl/test-result:gap-x-[4px] items-center overflow-hidden text-ellipsis grow @xl/test-result:grow-0 @xl/test-result:shrink-[2] text-[14px] @xl/test-result:text-[16px] text-gray-700',
82
- it: 'box-border flex flex-nowrap items-center overflow-hidden grow @xl/test-result:grow-0 @xl/test-result:shrink text-gray-1000 @xl/test-result:text-gray-700',
83
- },
84
- item: {
85
- base: 'box-border @xl/test-result:w-[max-content] min-w-[16px] h-[20px] @xl/test-result:h-[24px] gap-x-[8px] max-w-[max-content]',
86
- first: 'shrink basis-[max-content]',
87
- middle: 'shrink-[900000] basis-auto',
88
- last: 'flex shrink grow basis-[100%] w-[100%] @xl/test-result:shrink @xl/test-result:basis-[max-content]',
89
- text: {
90
- base: 'box-border relative inline-block w-[100%] shrink max-w-max whitespace-nowrap overflow-hidden text-ellipsis min-w-[16px] leading-[18px] @xl/test-result:leading-[24px]',
91
- it: ' @xl/test-result:[direction:rtl] pr-[8px]',
92
- },
93
- },
94
- },
95
- attribute: {
96
- container: 'box-border flex items-center grow gap-x-[6px]',
97
- },
98
- chevron: {
99
- container: 'relative text-gray-300 shrink-0 top-[-3px] @xl/test-result:top-0',
100
- },
101
- button: {
102
- container: 'shrink-0 flex flex-nowrap items-center gap-x-[8px] justify-end',
103
- },
104
- group: {
105
- container: 'pb-[4px] empty:hidden',
106
- },
107
- };
108
-
109
- /******************************************************************************
110
- Copyright (c) Microsoft Corporation.
111
-
112
- Permission to use, copy, modify, and/or distribute this software for any
113
- purpose with or without fee is hereby granted.
114
-
115
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
116
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
117
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
118
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
119
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
120
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
121
- PERFORMANCE OF THIS SOFTWARE.
122
- ***************************************************************************** */
123
- /* global Reflect, Promise, SuppressedError, Symbol */
124
-
125
-
126
- var __assign$1 = function() {
127
- __assign$1 = Object.assign || function __assign(t) {
128
- for (var s, i = 1, n = arguments.length; i < n; i++) {
129
- s = arguments[i];
130
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
131
- }
132
- return t;
133
- };
134
- return __assign$1.apply(this, arguments);
135
- };
136
-
137
- function __rest$1(s, e) {
138
- var t = {};
139
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
140
- t[p] = s[p];
141
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
142
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
143
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
144
- t[p[i]] = s[p[i]];
145
- }
146
- return t;
147
- }
148
-
149
- function __spreadArray(to, from, pack) {
150
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
151
- if (ar || !(i in from)) {
152
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
153
- ar[i] = from[i];
154
- }
155
- }
156
- return to.concat(ar || Array.prototype.slice.call(from));
157
- }
158
-
159
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
160
- var e = new Error(message);
161
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
162
- };
163
-
164
- /**
165
- * This "const" is used to create the list of statuses
166
- */
167
- const constStatuses = {
168
- running: {
169
- // <tw-keep strokeColor="indigo-400" />
170
- color: 'indigo-400',
171
- use: 'Runs, specs, groups, test results',
172
- variants: ['outline'],
173
- // <tw-keep fillColor="gray-100" />
174
- secondaryColor: 'gray-100',
175
- },
176
- failing: {
177
- // <tw-keep strokeColor="red-400" />
178
- color: 'red-400',
179
- use: 'Runs, specs, groups, test results',
180
- variants: ['outline'],
181
- // <tw-keep fillColor="gray-100" />
182
- secondaryColor: 'gray-100',
183
- },
184
- passed: {
185
- // <tw-keep strokeColor="jade-400" />
186
- color: 'jade-400',
187
- use: 'Runs, specs, groups, test results',
188
- link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Passed',
189
- variants: ['outline', 'simple', 'solid'],
190
- },
191
- failed: {
192
- // <tw-keep strokeColor="red-400" />
193
- color: 'red-400',
194
- use: 'Runs, specs, groups, test results',
195
- link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Failed',
196
- variants: ['outline', 'simple', 'solid'],
197
- },
198
- unclaimed: {
199
- // <tw-keep strokeColor="gray-100" />
200
- color: 'gray-100',
201
- use: 'Specs',
202
- variants: ['outline'],
203
- },
204
- placeholder: {
205
- // <tw-keep strokeColor="gray-300" />
206
- color: 'gray-300',
207
- use: 'Placeholder',
208
- variants: ['solid'],
209
- },
210
- cancelled: {
211
- // <tw-keep strokeColor="gray-300" />
212
- color: 'gray-300',
213
- use: 'Runs, specs, groups, test results',
214
- variants: ['outline', 'solid'],
215
- },
216
- noTests: {
217
- // <tw-keep strokeColor="orange-400" />
218
- color: 'orange-400',
219
- use: 'Runs, specs, groups',
220
- variants: ['outline', 'solid'],
221
- },
222
- errored: {
223
- // <tw-keep strokeColor="orange-400" />
224
- color: 'orange-400',
225
- use: 'Runs, specs, groups, test results',
226
- variants: ['outline', 'solid'],
227
- },
228
- timedOut: {
229
- // <tw-keep strokeColor="orange-400" />
230
- color: 'orange-400',
231
- use: 'Runs, specs, groups, test results',
232
- variants: ['outline', 'solid'],
233
- },
234
- overLimit: {
235
- // <tw-keep strokeColor="orange-400" />
236
- color: 'orange-400',
237
- use: 'Runs, specs, groups',
238
- link: 'https://docs.cypress.io/faq/questions/dashboard-faq#What-happens-once-I-reach-the-test-results-limit',
239
- variants: ['outline', 'solid'],
240
- },
241
- skipped: {
242
- // <tw-keep strokeColor="gray-400" />
243
- color: 'gray-400',
244
- use: 'Test results',
245
- link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Skipped',
246
- variants: ['outline'],
247
- },
248
- pending: {
249
- // <tw-keep strokeColor="gray-300" />
250
- color: 'gray-300',
251
- use: 'Test results',
252
- link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Pending',
253
- variants: ['outline'],
254
- },
255
- };
256
- /**
257
- * The status we have here, allow us to check the validity of the constant
258
- */
259
- const statuses$3 = constStatuses;
260
-
261
- const statuses = {
262
- running: {
263
- size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
264
- size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
265
- size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
266
- size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
267
- size24Icon: iconsRegistry.cyStatusRunningOutlineX24,
268
- },
269
- failing: {
270
- size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
271
- size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
272
- size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
273
- size16Icon: iconsRegistry.cyStatusFailingOutlineX16,
274
- size24Icon: iconsRegistry.cyStatusFailingOutlineX24,
275
- },
276
- passed: {
277
- size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
278
- size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
279
- size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
280
- size16Icon: iconsRegistry.cyStatusPassedSolidX16,
281
- size24Icon: iconsRegistry.cyStatusPassedSolidX24,
282
- },
283
- failed: {
284
- size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
285
- size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
286
- size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
287
- size16Icon: iconsRegistry.cyStatusFailedSolidX16,
288
- size24Icon: iconsRegistry.cyStatusFailedSolidX24,
289
- },
290
- unclaimed: {
291
- size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
292
- size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
293
- size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
294
- size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
295
- size24Icon: iconsRegistry.cyStatusQueuedOutlineX24,
296
- },
297
- placeholder: {
298
- size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
299
- size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
300
- size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
301
- size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
302
- size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24,
303
- },
304
- cancelled: {
305
- size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
306
- size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
307
- size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
308
- size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
309
- size24Icon: iconsRegistry.cyStatusCancelledSolidX24,
310
- },
311
- noTests: {
312
- size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
313
- size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
314
- size12Icon: iconsRegistry.cyStatusErroredSolidX12,
315
- size16Icon: iconsRegistry.cyStatusErroredSolidX16,
316
- size24Icon: iconsRegistry.cyStatusErroredSolidX24,
317
- },
318
- errored: {
319
- size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
320
- size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
321
- size12Icon: iconsRegistry.cyStatusErroredSolidX12,
322
- size16Icon: iconsRegistry.cyStatusErroredSolidX16,
323
- size24Icon: iconsRegistry.cyStatusErroredSolidX24,
324
- },
325
- timedOut: {
326
- size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
327
- size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
328
- size12Icon: iconsRegistry.cyStatusErroredSolidX12,
329
- size16Icon: iconsRegistry.cyStatusErroredSolidX16,
330
- size24Icon: iconsRegistry.cyStatusErroredSolidX24,
331
- },
332
- overLimit: {
333
- size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
334
- size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
335
- size12Icon: iconsRegistry.cyStatusErroredSolidX12,
336
- size16Icon: iconsRegistry.cyStatusErroredSolidX16,
337
- size24Icon: iconsRegistry.cyStatusErroredSolidX24,
338
- },
339
- skipped: {
340
- size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
341
- size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
342
- size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
343
- size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
344
- size24Icon: iconsRegistry.cyStatusSkippedOutlineX24,
345
- },
346
- pending: {
347
- size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
348
- size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
349
- size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
350
- size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
351
- size24Icon: iconsRegistry.cyStatusPendingOutlineX24,
352
- },
353
- };
354
-
355
- /******************************************************************************
356
- Copyright (c) Microsoft Corporation.
357
-
358
- Permission to use, copy, modify, and/or distribute this software for any
359
- purpose with or without fee is hereby granted.
360
-
361
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
362
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
363
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
364
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
365
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
366
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
367
- PERFORMANCE OF THIS SOFTWARE.
368
- ***************************************************************************** */
369
- /* global Reflect, Promise, SuppressedError, Symbol */
370
-
371
-
372
- var __assign$2 = function() {
373
- __assign$2 = Object.assign || function __assign(t) {
374
- for (var s, i = 1, n = arguments.length; i < n; i++) {
375
- s = arguments[i];
376
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
377
- }
378
- return t;
379
- };
380
- return __assign$2.apply(this, arguments);
381
- };
382
-
383
- function __rest$2(s, e) {
384
- var t = {};
385
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
386
- t[p] = s[p];
387
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
388
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
389
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
390
- t[p[i]] = s[p[i]];
391
- }
392
- return t;
393
- }
394
-
395
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
396
- var e = new Error(message);
397
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
398
- };
399
-
400
- var compileReactIconProperties$1 = function (_a) {
401
- var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, alt = _a.alt, attributes = __rest$2(_a, ["body", "defs", "compiledClasses", "size", "name", "alt"]);
402
- var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
403
- if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
404
- attrName !== 'name') {
405
- // @ts-expect-error the ky of React's SVGProps is too broad and
406
- // breaks here. Since we do not need to check for it. We keep the expect error
407
- newAttributes[attrName] =
408
- attributes[attrName];
409
- }
410
- return newAttributes;
411
- }, {});
412
- // eslint-disable-next-line react-hooks/rules-of-hooks
413
- React__namespace.useEffect(function () {
414
- var iconFileId = "".concat(name, "_").concat(size);
415
- if (defs) {
416
- if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
417
- return;
418
- }
419
- var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
420
- svgElement.setAttribute('data-cy-svg-defs', iconFileId);
421
- svgElement.setAttribute('width', '0');
422
- svgElement.setAttribute('height', '0');
423
- svgElement.innerHTML = defs;
424
- document.body.appendChild(svgElement);
425
- }
426
- }, [defs, name, size]);
427
- var componentProps = __assign$2({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
428
- __html: alt
429
- ? "<title>".concat(alt.replace(/[><]/g, function (s) {
430
- return s === '>' ? '&gt;' : '&lt;';
431
- }), "</title>").concat(body)
432
- : body,
433
- }, className: undefined }, filteredAttributes);
434
- if (attributes.className) {
435
- compiledClasses.push(attributes.className);
436
- }
437
- if (compiledClasses.length) {
438
- componentProps.className = compiledClasses.join(' ');
439
- }
440
- return componentProps;
441
- };
442
-
443
-
444
- /* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
445
-
446
- var compileProps = function (_a) {
447
- var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size, variantName = _a.variantName;
448
- var statusInfo = status ? statuses[status] : statuses.placeholder;
449
- var iconInfo = status ? statuses$3[status] : statuses$3.placeholder;
450
- var iconData = statusInfo["size".concat(size, "Icon")].data;
451
- var classes = "inline-block ".concat(className || '');
452
- var compiledClasses = iconsRegistry.getComponentAttributes({
453
- strokeColor: iconInfo.color,
454
- size: size,
455
- availableSizes: [size],
456
- fillColor: iconInfo.secondaryColor,
457
- }).compiledClasses;
458
- return compileReactIconProperties$1({
459
- body: iconData,
460
- compiledClasses: __spreadArray(__spreadArray([], compiledClasses, true), [classes], false),
461
- size: size,
462
- name: "status_".concat(status, "_").concat(size, "_").concat(variantName),
463
- });
464
- };
465
-
466
- var SolidStatusIcon = function (_a) {
467
- var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest$1(_a, ["size", "status"]);
468
- return React__namespace.createElement('svg', __assign$1(__assign$1({}, rest), compileProps({
469
- status: status,
470
- statuses: statuses,
471
- className: rest.className,
472
- size: size,
473
- variantName: 'solid',
474
- })));
475
- };
476
-
477
-
478
- /* <wind-keep class="outline inline-block icon-dark-indigo-400 icon-light-gray-100 icon-dark-red-400 icon-dark-jade-400 icon-dark-gray-100 icon-dark-gray-300 icon-dark-orange-400 icon-dark-gray-400"> */
479
27
 
480
28
  /******************************************************************************
481
29
  Copyright (c) Microsoft Corporation.
@@ -522,130 +70,42 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
522
70
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
523
71
  };
524
72
 
525
- var compileReactIconProperties = function (_a) {
526
- var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, alt = _a.alt, attributes = __rest(_a, ["body", "defs", "compiledClasses", "size", "name", "alt"]);
527
- var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
528
- if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
529
- attrName !== 'name') {
530
- // @ts-expect-error the ky of React's SVGProps is too broad and
531
- // breaks here. Since we do not need to check for it. We keep the expect error
532
- newAttributes[attrName] =
533
- attributes[attrName];
534
- }
535
- return newAttributes;
536
- }, {});
537
- // eslint-disable-next-line react-hooks/rules-of-hooks
538
- React__namespace.useEffect(function () {
539
- var iconFileId = "".concat(name, "_").concat(size);
540
- if (defs) {
541
- if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
542
- return;
543
- }
544
- var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
545
- svgElement.setAttribute('data-cy-svg-defs', iconFileId);
546
- svgElement.setAttribute('width', '0');
547
- svgElement.setAttribute('height', '0');
548
- svgElement.innerHTML = defs;
549
- document.body.appendChild(svgElement);
550
- }
551
- }, [defs, name, size]);
552
- var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
553
- __html: alt
554
- ? "<title>".concat(alt.replace(/[><]/g, function (s) {
555
- return s === '>' ? '&gt;' : '&lt;';
556
- }), "</title>").concat(body)
557
- : body,
558
- }, className: undefined }, filteredAttributes);
559
- if (attributes.className) {
560
- compiledClasses.push(attributes.className);
561
- }
562
- if (compiledClasses.length) {
563
- componentProps.className = compiledClasses.join(' ');
564
- }
565
- return componentProps;
566
- };
567
-
568
- function useIconProps(props, iconBodiesAndDefs, availableSizes, name) {
569
- var interactiveColorsOnGroup = props.interactiveColorsOnGroup, cleanProps = __rest(props, ["interactiveColorsOnGroup"]);
570
- var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, cleanProps), { availableSizes: availableSizes, interactiveColorsOnGroup: interactiveColorsOnGroup })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
571
- var _b = iconBodiesAndDefs[size] || {}, body = _b.body, defs = _b.defs;
572
- if (!body) {
573
- throw Error("Icon \"".concat(name, "\" is not available in size ").concat(size));
574
- }
575
- return compileReactIconProperties(__assign(__assign({}, cleanProps), { name: name, size: size, body: body, defs: defs, compiledClasses: compiledClasses }));
576
- }
577
- var IconChevronRightSmall = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
578
- "8": {
579
- "body": "<path d=\"m2.5 1 3 3-3 3\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
580
- },
581
- "16": {
582
- "body": "<path d=\"m6 12 4-4-4-4\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
583
- }
584
- }, ["8", "16"], "chevron-right-small")); };
585
- var IconDocumentAddedSquarePlus = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
586
- "16": {
587
- "body": "<path d=\"M2 12V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2Z\" fill=\"#E4FBF2\" class=\"icon-light\"/><path d=\"M8 6v4m2-2H6m6-6H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Z\" stroke=\"#1FA971\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
588
- },
589
- "24": {
590
- "body": "<path d=\"M3 18V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3Z\" fill=\"#E4FBF2\" class=\"icon-light\"/><path d=\"M12 8v8m4-4H8m10-9H6a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Z\" stroke=\"#1FA971\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
591
- }
592
- }, ["16", "24"], "document-added-square-plus")); };
593
- var IconDocumentModifiedSquareDot = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
594
- "16": {
595
- "body": "<path d=\"M9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm4 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/><path clip-rule=\"evenodd\" d=\"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm4 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
596
- },
597
- "24": {
598
- "body": "<path d=\"M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\" fill=\"#DB7903\" class=\"icon-dark\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm6 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/><path clip-rule=\"evenodd\" d=\"M6 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm6 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
599
- }
600
- }, ["16", "24"], "document-modified-square-dot")); };
601
- var IconStatusFlaky = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
602
- "16": {
603
- "body": "<path d=\"M1 12V4a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M9.5 5h-3v3.5m0 2.5V8.5m0 0h2\" stroke=\"#963F00\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
604
- },
605
- "24": {
606
- "body": "<path d=\"M2 18V6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M14 8h-4v4.5m0 3.5v-3.5m0 0h3\" stroke=\"#963F00\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
607
- }
608
- }, ["16", "24"], "status-flaky")); };
609
-
610
-
611
- /* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
612
-
613
73
  var TestResult = function (_a) {
614
- var status = _a.status, names = _a.names, flaky = _a.flaky, modified = _a.modified, added = _a.added, className = _a.className, groups = _a.groups, children = _a.children, rest = __rest$3(_a, ["status", "names", "flaky", "modified", "added", "className", "groups", "children"]);
615
- return (React__namespace.createElement("div", __assign$3({ "data-cy": "cd-tr-container" }, rest, { className: clsx(classes.container, className) }),
616
- React__namespace.createElement("div", { "data-cy": "cd-tr-row", className: classes.row },
617
- React__namespace.createElement("div", { "data-cy": "cd-tr-list", className: classes.list },
618
- React__namespace.createElement("div", { "data-cy": "cd-tr-icon", className: classes.icon },
619
- React__namespace.createElement(SolidStatusIcon, { size: "16", status: status, className: classes.status_icon })),
620
- React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-column", className: classes.name.container.column },
621
- names.slice(0, -1).length > 0 && (React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-describes", className: classes.name.container.describes }, names.slice(0, -1).map(function (name, index) {
74
+ var status = _a.status, names = _a.names, flaky = _a.flaky, modified = _a.modified, added = _a.added, className = _a.className, groups = _a.groups, children = _a.children, rest = __rest(_a, ["status", "names", "flaky", "modified", "added", "className", "groups", "children"]);
75
+ return (React__namespace.createElement("div", __assign({ "data-cy": "cd-tr-container" }, rest, { className: clsx(constantsTestresult.classes.container, className) }),
76
+ React__namespace.createElement("div", { "data-cy": "cd-tr-row", className: constantsTestresult.classes.row },
77
+ React__namespace.createElement("div", { "data-cy": "cd-tr-list", className: constantsTestresult.classes.list },
78
+ React__namespace.createElement("div", { "data-cy": "cd-tr-icon", className: constantsTestresult.classes.icon },
79
+ React__namespace.createElement(reactStatusicon.SolidStatusIcon, { size: "16", status: status, className: constantsTestresult.classes.status_icon })),
80
+ React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-column", className: constantsTestresult.classes.name.container.column },
81
+ names.slice(0, -1).length > 0 && (React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-describes", className: constantsTestresult.classes.name.container.describes }, names.slice(0, -1).map(function (name, index) {
622
82
  var _a;
623
83
  return (React__namespace.createElement(React__namespace.Fragment, { key: index },
624
84
  React__namespace.createElement("div", { "data-cy": "cd-tr-name-item", className: clsx((_a = {},
625
- _a[classes.name.item.base] = true,
626
- _a[classes.name.item.first] = names.length >= 2 && index === 0,
627
- _a[classes.name.item.middle] = names.length >= 2 &&
85
+ _a[constantsTestresult.classes.name.item.base] = true,
86
+ _a[constantsTestresult.classes.name.item.first] = names.length >= 2 && index === 0,
87
+ _a[constantsTestresult.classes.name.item.middle] = names.length >= 2 &&
628
88
  index > 0 &&
629
89
  index < names.length - 1,
630
90
  _a)) },
631
- React__namespace.createElement("span", { "data-cy": "cd-tr-name-item-text", className: classes.name.item.text.base }, name)),
632
- index < names.length - 1 && (React__namespace.createElement("div", { "data-cy": "cd-tr-chevron", className: classes.chevron.container },
633
- React__namespace.createElement(IconChevronRightSmall, { strokeColor: "gray-200", className: "mt-[2px]" })))));
91
+ React__namespace.createElement("span", { "data-cy": "cd-tr-name-item-text", className: constantsTestresult.classes.name.item.text.base }, name)),
92
+ index < names.length - 1 && (React__namespace.createElement("div", { "data-cy": "cd-tr-chevron", className: constantsTestresult.classes.chevron.container },
93
+ React__namespace.createElement(reactIcon.IconChevronRightSmall, { strokeColor: "gray-200", className: "mt-[2px]" })))));
634
94
  }))),
635
- React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-it", className: classes.name.container.it },
95
+ React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-it", className: constantsTestresult.classes.name.container.it },
636
96
  React__namespace.createElement("span", { "data-cy": "cd-tr-name-item-text", className: [
637
- classes.name.item.text.base,
638
- classes.name.item.text.it,
97
+ constantsTestresult.classes.name.item.text.base,
98
+ constantsTestresult.classes.name.item.text.it,
639
99
  ].join(' ') }, names.at(-1)),
640
- (flaky || modified || added) && (React__namespace.createElement("div", { "data-cy": "cd-tr-attributes", className: classes.attribute.container },
641
- flaky && React__namespace.createElement(IconStatusFlaky, { "data-cy": "cd-tr-flaky" }),
642
- modified && (React__namespace.createElement(IconDocumentModifiedSquareDot, { "data-cy": "cd-tr-modified" })),
643
- added && (React__namespace.createElement(IconDocumentAddedSquarePlus, { "data-cy": "cd-tr-added" })))))),
644
- children ? (React__namespace.createElement("div", { "data-cy": "cd-tr-actions", className: classes.button.container }, children)) : null),
645
- groups ? (React__namespace.createElement("div", { "data-cy": "cd-tr-group-container", className: classes.group.container }, groups)) : null)));
100
+ (flaky || modified || added) && (React__namespace.createElement("div", { "data-cy": "cd-tr-attributes", className: constantsTestresult.classes.attribute.container },
101
+ flaky && React__namespace.createElement(reactIcon.IconStatusFlaky, { "data-cy": "cd-tr-flaky" }),
102
+ modified && (React__namespace.createElement(reactIcon.IconDocumentModifiedSquareDot, { "data-cy": "cd-tr-modified" })),
103
+ added && (React__namespace.createElement(reactIcon.IconDocumentAddedSquarePlus, { "data-cy": "cd-tr-added" })))))),
104
+ children ? (React__namespace.createElement("div", { "data-cy": "cd-tr-actions", className: constantsTestresult.classes.button.container }, children)) : null),
105
+ groups ? (React__namespace.createElement("div", { "data-cy": "cd-tr-group-container", className: constantsTestresult.classes.group.container }, groups)) : null)));
646
106
  };
647
107
 
648
108
  module.exports = TestResult;
649
109
  //# sourceMappingURL=index.umd.js.map
650
110
 
651
- /* <wind-keep class="container mt-[2px] box-border relative hover:z-10 hover:outline outline-[3px] outline-gray-50 transition-all rounded-[1px] mix-blend-darken my-[-1px] flex flex-col flex-nowrap items-stretch gap-y-[16px] p-[11px] border border-gray-100 hover:border-gray-300 cursor-pointer justify-start items-center @xl/test-result:px-[15px] w-[100%] h-[100%] @xl/test-result:h-[32px] gap-x-[8px] h-[16px] w-[16px] align-top @xl/test-result:flex-row gap-x-[4px] @xl/test-result:items-center shrink grow overflow-hidden gap-x-[2px] @xl/test-result:gap-x-[4px] text-ellipsis @xl/test-result:grow-0 @xl/test-result:shrink-[2] text-[14px] @xl/test-result:text-[16px] text-gray-700 @xl/test-result:shrink text-gray-1000 @xl/test-result:text-gray-700 @xl/test-result:w-[max-content] min-w-[16px] h-[20px] @xl/test-result:h-[24px] max-w-[max-content] basis-[max-content] shrink-[900000] basis-auto basis-[100%] @xl/test-result:basis-[max-content] inline-block max-w-max whitespace-nowrap leading-[18px] @xl/test-result:leading-[24px] @xl/test-result:[direction:rtl] pr-[8px] gap-x-[6px] text-gray-300 shrink-0 top-[-3px] @xl/test-result:top-0 justify-end pb-[4px] empty:hidden truncate @container/test-result"> */
111
+ /* <wind-keep class="container mt-[2px]"> */