@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/.turbo/turbo-build.log +3 -1
- package/CHANGELOG.md +10 -0
- package/dist/index.es.mjs +6 -546
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +27 -567
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/rollup.config.mjs +5 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
$ yarn build:module && yarn build:types
|
|
2
2
|
$ rollup -c ./rollup.config.mjs
|
|
3
|
+
(node:4458) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
4
|
+
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
5
|
[36m
|
|
4
6
|
[1m./index.ts[22m → [1m./dist/index.umd.js, ./dist/index.es.mjs[22m...[39m
|
|
5
|
-
[32mcreated [1m./dist/index.umd.js, ./dist/index.es.mjs[22m in [
|
|
7
|
+
[32mcreated [1m./dist/index.umd.js, ./dist/index.es.mjs[22m in [1m2.7s[22m[39m
|
|
6
8
|
$ tsc --project ./tsconfig.build.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @cypress-design/react-testresult
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#450](https://github.com/cypress-io/cypress-design/pull/450) [`927097f`](https://github.com/cypress-io/cypress-design/commit/927097f409235ac78c98b281c4d9b2ec70dfe01d) Thanks [@elevatebart](https://github.com/elevatebart)! - optim: do not package dependencies
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`927097f`](https://github.com/cypress-io/cypress-design/commit/927097f409235ac78c98b281c4d9b2ec70dfe01d), [`927097f`](https://github.com/cypress-io/cypress-design/commit/927097f409235ac78c98b281c4d9b2ec70dfe01d)]:
|
|
10
|
+
- @cypress-design/react-icon@1.1.0
|
|
11
|
+
- @cypress-design/react-statusicon@1.0.1
|
|
12
|
+
|
|
3
13
|
## 1.0.0
|
|
4
14
|
|
|
5
15
|
### Major Changes
|
package/dist/index.es.mjs
CHANGED
|
@@ -1,460 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
/******************************************************************************
|
|
7
|
-
Copyright (c) Microsoft Corporation.
|
|
8
|
-
|
|
9
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
-
purpose with or without fee is hereby granted.
|
|
11
|
-
|
|
12
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
14
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
16
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
17
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
-
***************************************************************************** */
|
|
20
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var __assign$3 = function() {
|
|
24
|
-
__assign$3 = Object.assign || function __assign(t) {
|
|
25
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
26
|
-
s = arguments[i];
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
};
|
|
31
|
-
return __assign$3.apply(this, arguments);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
function __rest$3(s, e) {
|
|
35
|
-
var t = {};
|
|
36
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
37
|
-
t[p] = s[p];
|
|
38
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
39
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
40
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
41
|
-
t[p[i]] = s[p[i]];
|
|
42
|
-
}
|
|
43
|
-
return t;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
47
|
-
var e = new Error(message);
|
|
48
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const classes = {
|
|
52
|
-
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]',
|
|
53
|
-
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]',
|
|
54
|
-
list: 'box-border flex justify-start items-center flex-nowrap w-[100%] h-[100%] @xl/test-result:h-[32px] gap-x-[8px]',
|
|
55
|
-
icon: 'box-border h-[16px] w-[16px]',
|
|
56
|
-
status_icon: 'align-top',
|
|
57
|
-
name: {
|
|
58
|
-
container: {
|
|
59
|
-
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',
|
|
60
|
-
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',
|
|
61
|
-
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',
|
|
62
|
-
},
|
|
63
|
-
item: {
|
|
64
|
-
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]',
|
|
65
|
-
first: 'shrink basis-[max-content]',
|
|
66
|
-
middle: 'shrink-[900000] basis-auto',
|
|
67
|
-
last: 'flex shrink grow basis-[100%] w-[100%] @xl/test-result:shrink @xl/test-result:basis-[max-content]',
|
|
68
|
-
text: {
|
|
69
|
-
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]',
|
|
70
|
-
it: ' @xl/test-result:[direction:rtl] pr-[8px]',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
attribute: {
|
|
75
|
-
container: 'box-border flex items-center grow gap-x-[6px]',
|
|
76
|
-
},
|
|
77
|
-
chevron: {
|
|
78
|
-
container: 'relative text-gray-300 shrink-0 top-[-3px] @xl/test-result:top-0',
|
|
79
|
-
},
|
|
80
|
-
button: {
|
|
81
|
-
container: 'shrink-0 flex flex-nowrap items-center gap-x-[8px] justify-end',
|
|
82
|
-
},
|
|
83
|
-
group: {
|
|
84
|
-
container: 'pb-[4px] empty:hidden',
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/******************************************************************************
|
|
89
|
-
Copyright (c) Microsoft Corporation.
|
|
90
|
-
|
|
91
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
92
|
-
purpose with or without fee is hereby granted.
|
|
93
|
-
|
|
94
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
95
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
96
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
97
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
98
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
99
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
100
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
101
|
-
***************************************************************************** */
|
|
102
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
var __assign$1 = function() {
|
|
106
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
107
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
108
|
-
s = arguments[i];
|
|
109
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
110
|
-
}
|
|
111
|
-
return t;
|
|
112
|
-
};
|
|
113
|
-
return __assign$1.apply(this, arguments);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
function __rest$1(s, e) {
|
|
117
|
-
var t = {};
|
|
118
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
119
|
-
t[p] = s[p];
|
|
120
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
121
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
122
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
123
|
-
t[p[i]] = s[p[i]];
|
|
124
|
-
}
|
|
125
|
-
return t;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function __spreadArray(to, from, pack) {
|
|
129
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
130
|
-
if (ar || !(i in from)) {
|
|
131
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
132
|
-
ar[i] = from[i];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
139
|
-
var e = new Error(message);
|
|
140
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* This "const" is used to create the list of statuses
|
|
145
|
-
*/
|
|
146
|
-
const constStatuses = {
|
|
147
|
-
running: {
|
|
148
|
-
// <tw-keep strokeColor="indigo-400" />
|
|
149
|
-
color: 'indigo-400',
|
|
150
|
-
use: 'Runs, specs, groups, test results',
|
|
151
|
-
variants: ['outline'],
|
|
152
|
-
// <tw-keep fillColor="gray-100" />
|
|
153
|
-
secondaryColor: 'gray-100',
|
|
154
|
-
},
|
|
155
|
-
failing: {
|
|
156
|
-
// <tw-keep strokeColor="red-400" />
|
|
157
|
-
color: 'red-400',
|
|
158
|
-
use: 'Runs, specs, groups, test results',
|
|
159
|
-
variants: ['outline'],
|
|
160
|
-
// <tw-keep fillColor="gray-100" />
|
|
161
|
-
secondaryColor: 'gray-100',
|
|
162
|
-
},
|
|
163
|
-
passed: {
|
|
164
|
-
// <tw-keep strokeColor="jade-400" />
|
|
165
|
-
color: 'jade-400',
|
|
166
|
-
use: 'Runs, specs, groups, test results',
|
|
167
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Passed',
|
|
168
|
-
variants: ['outline', 'simple', 'solid'],
|
|
169
|
-
},
|
|
170
|
-
failed: {
|
|
171
|
-
// <tw-keep strokeColor="red-400" />
|
|
172
|
-
color: 'red-400',
|
|
173
|
-
use: 'Runs, specs, groups, test results',
|
|
174
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Failed',
|
|
175
|
-
variants: ['outline', 'simple', 'solid'],
|
|
176
|
-
},
|
|
177
|
-
unclaimed: {
|
|
178
|
-
// <tw-keep strokeColor="gray-100" />
|
|
179
|
-
color: 'gray-100',
|
|
180
|
-
use: 'Specs',
|
|
181
|
-
variants: ['outline'],
|
|
182
|
-
},
|
|
183
|
-
placeholder: {
|
|
184
|
-
// <tw-keep strokeColor="gray-300" />
|
|
185
|
-
color: 'gray-300',
|
|
186
|
-
use: 'Placeholder',
|
|
187
|
-
variants: ['solid'],
|
|
188
|
-
},
|
|
189
|
-
cancelled: {
|
|
190
|
-
// <tw-keep strokeColor="gray-300" />
|
|
191
|
-
color: 'gray-300',
|
|
192
|
-
use: 'Runs, specs, groups, test results',
|
|
193
|
-
variants: ['outline', 'solid'],
|
|
194
|
-
},
|
|
195
|
-
noTests: {
|
|
196
|
-
// <tw-keep strokeColor="orange-400" />
|
|
197
|
-
color: 'orange-400',
|
|
198
|
-
use: 'Runs, specs, groups',
|
|
199
|
-
variants: ['outline', 'solid'],
|
|
200
|
-
},
|
|
201
|
-
errored: {
|
|
202
|
-
// <tw-keep strokeColor="orange-400" />
|
|
203
|
-
color: 'orange-400',
|
|
204
|
-
use: 'Runs, specs, groups, test results',
|
|
205
|
-
variants: ['outline', 'solid'],
|
|
206
|
-
},
|
|
207
|
-
timedOut: {
|
|
208
|
-
// <tw-keep strokeColor="orange-400" />
|
|
209
|
-
color: 'orange-400',
|
|
210
|
-
use: 'Runs, specs, groups, test results',
|
|
211
|
-
variants: ['outline', 'solid'],
|
|
212
|
-
},
|
|
213
|
-
overLimit: {
|
|
214
|
-
// <tw-keep strokeColor="orange-400" />
|
|
215
|
-
color: 'orange-400',
|
|
216
|
-
use: 'Runs, specs, groups',
|
|
217
|
-
link: 'https://docs.cypress.io/faq/questions/dashboard-faq#What-happens-once-I-reach-the-test-results-limit',
|
|
218
|
-
variants: ['outline', 'solid'],
|
|
219
|
-
},
|
|
220
|
-
skipped: {
|
|
221
|
-
// <tw-keep strokeColor="gray-400" />
|
|
222
|
-
color: 'gray-400',
|
|
223
|
-
use: 'Test results',
|
|
224
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Skipped',
|
|
225
|
-
variants: ['outline'],
|
|
226
|
-
},
|
|
227
|
-
pending: {
|
|
228
|
-
// <tw-keep strokeColor="gray-300" />
|
|
229
|
-
color: 'gray-300',
|
|
230
|
-
use: 'Test results',
|
|
231
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Pending',
|
|
232
|
-
variants: ['outline'],
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* The status we have here, allow us to check the validity of the constant
|
|
237
|
-
*/
|
|
238
|
-
const statuses$3 = constStatuses;
|
|
239
|
-
|
|
240
|
-
const statuses = {
|
|
241
|
-
running: {
|
|
242
|
-
size4Icon: cyStatusRunningSimpleX4,
|
|
243
|
-
size8Icon: cyStatusRunningSimpleX8,
|
|
244
|
-
size12Icon: cyStatusRunningOutlineX12,
|
|
245
|
-
size16Icon: cyStatusRunningOutlineX16,
|
|
246
|
-
size24Icon: cyStatusRunningOutlineX24,
|
|
247
|
-
},
|
|
248
|
-
failing: {
|
|
249
|
-
size4Icon: cyStatusRunningSimpleX4,
|
|
250
|
-
size8Icon: cyStatusRunningSimpleX8,
|
|
251
|
-
size12Icon: cyStatusRunningOutlineX12,
|
|
252
|
-
size16Icon: cyStatusFailingOutlineX16,
|
|
253
|
-
size24Icon: cyStatusFailingOutlineX24,
|
|
254
|
-
},
|
|
255
|
-
passed: {
|
|
256
|
-
size4Icon: cyStatusPassedSimpleX4,
|
|
257
|
-
size8Icon: cyStatusPassedSimpleX8,
|
|
258
|
-
size12Icon: cyStatusPassedSimpleX12,
|
|
259
|
-
size16Icon: cyStatusPassedSolidX16,
|
|
260
|
-
size24Icon: cyStatusPassedSolidX24,
|
|
261
|
-
},
|
|
262
|
-
failed: {
|
|
263
|
-
size4Icon: cyStatusFailedSimpleX4,
|
|
264
|
-
size8Icon: cyStatusFailedSimpleX8,
|
|
265
|
-
size12Icon: cyStatusFailedSimpleX12,
|
|
266
|
-
size16Icon: cyStatusFailedSolidX16,
|
|
267
|
-
size24Icon: cyStatusFailedSolidX24,
|
|
268
|
-
},
|
|
269
|
-
unclaimed: {
|
|
270
|
-
size4Icon: cyStatusQueuedSimpleX4,
|
|
271
|
-
size8Icon: cyStatusQueuedSimpleX8,
|
|
272
|
-
size12Icon: cyStatusQueuedOutlineX12,
|
|
273
|
-
size16Icon: cyStatusQueuedOutlineX16,
|
|
274
|
-
size24Icon: cyStatusQueuedOutlineX24,
|
|
275
|
-
},
|
|
276
|
-
placeholder: {
|
|
277
|
-
size4Icon: cyStatusPlaceholderSimpleX4,
|
|
278
|
-
size8Icon: cyStatusPlaceholderSimpleX8,
|
|
279
|
-
size12Icon: cyStatusPlaceholderSolidX12,
|
|
280
|
-
size16Icon: cyStatusPlaceholderSolidX16,
|
|
281
|
-
size24Icon: cyStatusPlaceholderSolidX24,
|
|
282
|
-
},
|
|
283
|
-
cancelled: {
|
|
284
|
-
size4Icon: cyStatusCancelledSimpleX4,
|
|
285
|
-
size8Icon: cyStatusCancelledSimpleX8,
|
|
286
|
-
size12Icon: cyStatusCancelledSolidX12,
|
|
287
|
-
size16Icon: cyStatusCancelledSolidX16,
|
|
288
|
-
size24Icon: cyStatusCancelledSolidX24,
|
|
289
|
-
},
|
|
290
|
-
noTests: {
|
|
291
|
-
size4Icon: cyStatusErroredSimpleX4,
|
|
292
|
-
size8Icon: cyStatusErroredSimpleX8,
|
|
293
|
-
size12Icon: cyStatusErroredSolidX12,
|
|
294
|
-
size16Icon: cyStatusErroredSolidX16,
|
|
295
|
-
size24Icon: cyStatusErroredSolidX24,
|
|
296
|
-
},
|
|
297
|
-
errored: {
|
|
298
|
-
size4Icon: cyStatusErroredSimpleX4,
|
|
299
|
-
size8Icon: cyStatusErroredSimpleX8,
|
|
300
|
-
size12Icon: cyStatusErroredSolidX12,
|
|
301
|
-
size16Icon: cyStatusErroredSolidX16,
|
|
302
|
-
size24Icon: cyStatusErroredSolidX24,
|
|
303
|
-
},
|
|
304
|
-
timedOut: {
|
|
305
|
-
size4Icon: cyStatusErroredSimpleX4,
|
|
306
|
-
size8Icon: cyStatusErroredSimpleX8,
|
|
307
|
-
size12Icon: cyStatusErroredSolidX12,
|
|
308
|
-
size16Icon: cyStatusErroredSolidX16,
|
|
309
|
-
size24Icon: cyStatusErroredSolidX24,
|
|
310
|
-
},
|
|
311
|
-
overLimit: {
|
|
312
|
-
size4Icon: cyStatusErroredSimpleX4,
|
|
313
|
-
size8Icon: cyStatusErroredSimpleX8,
|
|
314
|
-
size12Icon: cyStatusErroredSolidX12,
|
|
315
|
-
size16Icon: cyStatusErroredSolidX16,
|
|
316
|
-
size24Icon: cyStatusErroredSolidX24,
|
|
317
|
-
},
|
|
318
|
-
skipped: {
|
|
319
|
-
size4Icon: cyStatusSkippedSimpleX4,
|
|
320
|
-
size8Icon: cyStatusSkippedSimpleX8,
|
|
321
|
-
size12Icon: cyStatusSkippedOutlineX12,
|
|
322
|
-
size16Icon: cyStatusSkippedOutlineX16,
|
|
323
|
-
size24Icon: cyStatusSkippedOutlineX24,
|
|
324
|
-
},
|
|
325
|
-
pending: {
|
|
326
|
-
size4Icon: cyStatusPendingSimpleX4,
|
|
327
|
-
size8Icon: cyStatusPendingSimpleX8,
|
|
328
|
-
size12Icon: cyStatusPendingOutlineX12,
|
|
329
|
-
size16Icon: cyStatusPendingOutlineX16,
|
|
330
|
-
size24Icon: cyStatusPendingOutlineX24,
|
|
331
|
-
},
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
/******************************************************************************
|
|
335
|
-
Copyright (c) Microsoft Corporation.
|
|
336
|
-
|
|
337
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
338
|
-
purpose with or without fee is hereby granted.
|
|
339
|
-
|
|
340
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
341
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
342
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
343
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
344
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
345
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
346
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
347
|
-
***************************************************************************** */
|
|
348
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
var __assign$2 = function() {
|
|
352
|
-
__assign$2 = Object.assign || function __assign(t) {
|
|
353
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
354
|
-
s = arguments[i];
|
|
355
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
356
|
-
}
|
|
357
|
-
return t;
|
|
358
|
-
};
|
|
359
|
-
return __assign$2.apply(this, arguments);
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
function __rest$2(s, e) {
|
|
363
|
-
var t = {};
|
|
364
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
365
|
-
t[p] = s[p];
|
|
366
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
367
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
368
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
369
|
-
t[p[i]] = s[p[i]];
|
|
370
|
-
}
|
|
371
|
-
return t;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
375
|
-
var e = new Error(message);
|
|
376
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
var compileReactIconProperties$1 = function (_a) {
|
|
380
|
-
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"]);
|
|
381
|
-
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
382
|
-
if (!ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
383
|
-
attrName !== 'name') {
|
|
384
|
-
// @ts-expect-error the ky of React's SVGProps is too broad and
|
|
385
|
-
// breaks here. Since we do not need to check for it. We keep the expect error
|
|
386
|
-
newAttributes[attrName] =
|
|
387
|
-
attributes[attrName];
|
|
388
|
-
}
|
|
389
|
-
return newAttributes;
|
|
390
|
-
}, {});
|
|
391
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
392
|
-
React.useEffect(function () {
|
|
393
|
-
var iconFileId = "".concat(name, "_").concat(size);
|
|
394
|
-
if (defs) {
|
|
395
|
-
if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
399
|
-
svgElement.setAttribute('data-cy-svg-defs', iconFileId);
|
|
400
|
-
svgElement.setAttribute('width', '0');
|
|
401
|
-
svgElement.setAttribute('height', '0');
|
|
402
|
-
svgElement.innerHTML = defs;
|
|
403
|
-
document.body.appendChild(svgElement);
|
|
404
|
-
}
|
|
405
|
-
}, [defs, name, size]);
|
|
406
|
-
var componentProps = __assign$2({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
407
|
-
__html: alt
|
|
408
|
-
? "<title>".concat(alt.replace(/[><]/g, function (s) {
|
|
409
|
-
return s === '>' ? '>' : '<';
|
|
410
|
-
}), "</title>").concat(body)
|
|
411
|
-
: body,
|
|
412
|
-
}, className: undefined }, filteredAttributes);
|
|
413
|
-
if (attributes.className) {
|
|
414
|
-
compiledClasses.push(attributes.className);
|
|
415
|
-
}
|
|
416
|
-
if (compiledClasses.length) {
|
|
417
|
-
componentProps.className = compiledClasses.join(' ');
|
|
418
|
-
}
|
|
419
|
-
return componentProps;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
/* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
|
|
424
|
-
|
|
425
|
-
var compileProps = function (_a) {
|
|
426
|
-
var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size, variantName = _a.variantName;
|
|
427
|
-
var statusInfo = status ? statuses[status] : statuses.placeholder;
|
|
428
|
-
var iconInfo = status ? statuses$3[status] : statuses$3.placeholder;
|
|
429
|
-
var iconData = statusInfo["size".concat(size, "Icon")].data;
|
|
430
|
-
var classes = "inline-block ".concat(className || '');
|
|
431
|
-
var compiledClasses = getComponentAttributes({
|
|
432
|
-
strokeColor: iconInfo.color,
|
|
433
|
-
size: size,
|
|
434
|
-
availableSizes: [size],
|
|
435
|
-
fillColor: iconInfo.secondaryColor,
|
|
436
|
-
}).compiledClasses;
|
|
437
|
-
return compileReactIconProperties$1({
|
|
438
|
-
body: iconData,
|
|
439
|
-
compiledClasses: __spreadArray(__spreadArray([], compiledClasses, true), [classes], false),
|
|
440
|
-
size: size,
|
|
441
|
-
name: "status_".concat(status, "_").concat(size, "_").concat(variantName),
|
|
442
|
-
});
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
var SolidStatusIcon = function (_a) {
|
|
446
|
-
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"]);
|
|
447
|
-
return React.createElement('svg', __assign$1(__assign$1({}, rest), compileProps({
|
|
448
|
-
status: status,
|
|
449
|
-
statuses: statuses,
|
|
450
|
-
className: rest.className,
|
|
451
|
-
size: size,
|
|
452
|
-
variantName: 'solid',
|
|
453
|
-
})));
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
/* <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"> */
|
|
3
|
+
import { classes } from '@cypress-design/constants-testresult';
|
|
4
|
+
import { SolidStatusIcon } from '@cypress-design/react-statusicon';
|
|
5
|
+
import { IconChevronRightSmall, IconStatusFlaky, IconDocumentModifiedSquareDot, IconDocumentAddedSquarePlus } from '@cypress-design/react-icon';
|
|
458
6
|
|
|
459
7
|
/******************************************************************************
|
|
460
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -501,97 +49,9 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
501
49
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
502
50
|
};
|
|
503
51
|
|
|
504
|
-
var compileReactIconProperties = function (_a) {
|
|
505
|
-
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"]);
|
|
506
|
-
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
507
|
-
if (!ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
508
|
-
attrName !== 'name') {
|
|
509
|
-
// @ts-expect-error the ky of React's SVGProps is too broad and
|
|
510
|
-
// breaks here. Since we do not need to check for it. We keep the expect error
|
|
511
|
-
newAttributes[attrName] =
|
|
512
|
-
attributes[attrName];
|
|
513
|
-
}
|
|
514
|
-
return newAttributes;
|
|
515
|
-
}, {});
|
|
516
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
517
|
-
React.useEffect(function () {
|
|
518
|
-
var iconFileId = "".concat(name, "_").concat(size);
|
|
519
|
-
if (defs) {
|
|
520
|
-
if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
524
|
-
svgElement.setAttribute('data-cy-svg-defs', iconFileId);
|
|
525
|
-
svgElement.setAttribute('width', '0');
|
|
526
|
-
svgElement.setAttribute('height', '0');
|
|
527
|
-
svgElement.innerHTML = defs;
|
|
528
|
-
document.body.appendChild(svgElement);
|
|
529
|
-
}
|
|
530
|
-
}, [defs, name, size]);
|
|
531
|
-
var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
532
|
-
__html: alt
|
|
533
|
-
? "<title>".concat(alt.replace(/[><]/g, function (s) {
|
|
534
|
-
return s === '>' ? '>' : '<';
|
|
535
|
-
}), "</title>").concat(body)
|
|
536
|
-
: body,
|
|
537
|
-
}, className: undefined }, filteredAttributes);
|
|
538
|
-
if (attributes.className) {
|
|
539
|
-
compiledClasses.push(attributes.className);
|
|
540
|
-
}
|
|
541
|
-
if (compiledClasses.length) {
|
|
542
|
-
componentProps.className = compiledClasses.join(' ');
|
|
543
|
-
}
|
|
544
|
-
return componentProps;
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
function useIconProps(props, iconBodiesAndDefs, availableSizes, name) {
|
|
548
|
-
var interactiveColorsOnGroup = props.interactiveColorsOnGroup, cleanProps = __rest(props, ["interactiveColorsOnGroup"]);
|
|
549
|
-
var _a = iconsRegistry.getComponentAttributes(__assign(__assign({}, cleanProps), { availableSizes: availableSizes, interactiveColorsOnGroup: interactiveColorsOnGroup })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
|
|
550
|
-
var _b = iconBodiesAndDefs[size] || {}, body = _b.body, defs = _b.defs;
|
|
551
|
-
if (!body) {
|
|
552
|
-
throw Error("Icon \"".concat(name, "\" is not available in size ").concat(size));
|
|
553
|
-
}
|
|
554
|
-
return compileReactIconProperties(__assign(__assign({}, cleanProps), { name: name, size: size, body: body, defs: defs, compiledClasses: compiledClasses }));
|
|
555
|
-
}
|
|
556
|
-
var IconChevronRightSmall = function (props) { return React.createElement('svg', useIconProps(props, {
|
|
557
|
-
"8": {
|
|
558
|
-
"body": "<path d=\"m2.5 1 3 3-3 3\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
|
|
559
|
-
},
|
|
560
|
-
"16": {
|
|
561
|
-
"body": "<path d=\"m6 12 4-4-4-4\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
|
|
562
|
-
}
|
|
563
|
-
}, ["8", "16"], "chevron-right-small")); };
|
|
564
|
-
var IconDocumentAddedSquarePlus = function (props) { return React.createElement('svg', useIconProps(props, {
|
|
565
|
-
"16": {
|
|
566
|
-
"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\"/>"
|
|
567
|
-
},
|
|
568
|
-
"24": {
|
|
569
|
-
"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\"/>"
|
|
570
|
-
}
|
|
571
|
-
}, ["16", "24"], "document-added-square-plus")); };
|
|
572
|
-
var IconDocumentModifiedSquareDot = function (props) { return React.createElement('svg', useIconProps(props, {
|
|
573
|
-
"16": {
|
|
574
|
-
"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\"/>"
|
|
575
|
-
},
|
|
576
|
-
"24": {
|
|
577
|
-
"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\"/>"
|
|
578
|
-
}
|
|
579
|
-
}, ["16", "24"], "document-modified-square-dot")); };
|
|
580
|
-
var IconStatusFlaky = function (props) { return React.createElement('svg', useIconProps(props, {
|
|
581
|
-
"16": {
|
|
582
|
-
"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\"/>"
|
|
583
|
-
},
|
|
584
|
-
"24": {
|
|
585
|
-
"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\"/>"
|
|
586
|
-
}
|
|
587
|
-
}, ["16", "24"], "status-flaky")); };
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
/* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
|
|
591
|
-
|
|
592
52
|
var TestResult = function (_a) {
|
|
593
|
-
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
|
|
594
|
-
return (React.createElement("div", __assign
|
|
53
|
+
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"]);
|
|
54
|
+
return (React.createElement("div", __assign({ "data-cy": "cd-tr-container" }, rest, { className: clsx(classes.container, className) }),
|
|
595
55
|
React.createElement("div", { "data-cy": "cd-tr-row", className: classes.row },
|
|
596
56
|
React.createElement("div", { "data-cy": "cd-tr-list", className: classes.list },
|
|
597
57
|
React.createElement("div", { "data-cy": "cd-tr-icon", className: classes.icon },
|
|
@@ -627,4 +87,4 @@ var TestResult = function (_a) {
|
|
|
627
87
|
export { TestResult as default };
|
|
628
88
|
//# sourceMappingURL=index.es.mjs.map
|
|
629
89
|
|
|
630
|
-
/* <wind-keep class="container mt-[2px]
|
|
90
|
+
/* <wind-keep class="container mt-[2px]"> */
|