@cypress-design/react-statusicon 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 +9 -0
- package/dist/index.es.mjs +24 -493
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +24 -493
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/rollup.config.mjs +5 -1
package/dist/index.umd.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
7
|
-
require('
|
|
6
|
+
var constantsStatusicon = require('@cypress-design/constants-statusicon');
|
|
7
|
+
var reactIcon = require('@cypress-design/react-icon');
|
|
8
|
+
var iconRegistry = require('@cypress-design/icon-registry');
|
|
8
9
|
|
|
9
10
|
function _interopNamespaceDefault(e) {
|
|
10
11
|
var n = Object.create(null);
|
|
@@ -42,18 +43,18 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
42
43
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
var __assign
|
|
46
|
-
__assign
|
|
46
|
+
var __assign = function() {
|
|
47
|
+
__assign = Object.assign || function __assign(t) {
|
|
47
48
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
48
49
|
s = arguments[i];
|
|
49
50
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
50
51
|
}
|
|
51
52
|
return t;
|
|
52
53
|
};
|
|
53
|
-
return __assign
|
|
54
|
+
return __assign.apply(this, arguments);
|
|
54
55
|
};
|
|
55
56
|
|
|
56
|
-
function __rest
|
|
57
|
+
function __rest(s, e) {
|
|
57
58
|
var t = {};
|
|
58
59
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
59
60
|
t[p] = s[p];
|
|
@@ -80,489 +81,19 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
80
81
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
81
82
|
};
|
|
82
83
|
|
|
83
|
-
/**
|
|
84
|
-
* This "const" is used to create the list of statuses
|
|
85
|
-
*/
|
|
86
|
-
const constStatuses = {
|
|
87
|
-
running: {
|
|
88
|
-
// <tw-keep strokeColor="indigo-400" />
|
|
89
|
-
color: 'indigo-400',
|
|
90
|
-
use: 'Runs, specs, groups, test results',
|
|
91
|
-
variants: ['outline'],
|
|
92
|
-
// <tw-keep fillColor="gray-100" />
|
|
93
|
-
secondaryColor: 'gray-100',
|
|
94
|
-
},
|
|
95
|
-
failing: {
|
|
96
|
-
// <tw-keep strokeColor="red-400" />
|
|
97
|
-
color: 'red-400',
|
|
98
|
-
use: 'Runs, specs, groups, test results',
|
|
99
|
-
variants: ['outline'],
|
|
100
|
-
// <tw-keep fillColor="gray-100" />
|
|
101
|
-
secondaryColor: 'gray-100',
|
|
102
|
-
},
|
|
103
|
-
passed: {
|
|
104
|
-
// <tw-keep strokeColor="jade-400" />
|
|
105
|
-
color: 'jade-400',
|
|
106
|
-
use: 'Runs, specs, groups, test results',
|
|
107
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Passed',
|
|
108
|
-
variants: ['outline', 'simple', 'solid'],
|
|
109
|
-
},
|
|
110
|
-
failed: {
|
|
111
|
-
// <tw-keep strokeColor="red-400" />
|
|
112
|
-
color: 'red-400',
|
|
113
|
-
use: 'Runs, specs, groups, test results',
|
|
114
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Failed',
|
|
115
|
-
variants: ['outline', 'simple', 'solid'],
|
|
116
|
-
},
|
|
117
|
-
unclaimed: {
|
|
118
|
-
// <tw-keep strokeColor="gray-100" />
|
|
119
|
-
color: 'gray-100',
|
|
120
|
-
use: 'Specs',
|
|
121
|
-
variants: ['outline'],
|
|
122
|
-
},
|
|
123
|
-
placeholder: {
|
|
124
|
-
// <tw-keep strokeColor="gray-300" />
|
|
125
|
-
color: 'gray-300',
|
|
126
|
-
use: 'Placeholder',
|
|
127
|
-
variants: ['solid'],
|
|
128
|
-
},
|
|
129
|
-
cancelled: {
|
|
130
|
-
// <tw-keep strokeColor="gray-300" />
|
|
131
|
-
color: 'gray-300',
|
|
132
|
-
use: 'Runs, specs, groups, test results',
|
|
133
|
-
variants: ['outline', 'solid'],
|
|
134
|
-
},
|
|
135
|
-
noTests: {
|
|
136
|
-
// <tw-keep strokeColor="orange-400" />
|
|
137
|
-
color: 'orange-400',
|
|
138
|
-
use: 'Runs, specs, groups',
|
|
139
|
-
variants: ['outline', 'solid'],
|
|
140
|
-
},
|
|
141
|
-
errored: {
|
|
142
|
-
// <tw-keep strokeColor="orange-400" />
|
|
143
|
-
color: 'orange-400',
|
|
144
|
-
use: 'Runs, specs, groups, test results',
|
|
145
|
-
variants: ['outline', 'solid'],
|
|
146
|
-
},
|
|
147
|
-
timedOut: {
|
|
148
|
-
// <tw-keep strokeColor="orange-400" />
|
|
149
|
-
color: 'orange-400',
|
|
150
|
-
use: 'Runs, specs, groups, test results',
|
|
151
|
-
variants: ['outline', 'solid'],
|
|
152
|
-
},
|
|
153
|
-
overLimit: {
|
|
154
|
-
// <tw-keep strokeColor="orange-400" />
|
|
155
|
-
color: 'orange-400',
|
|
156
|
-
use: 'Runs, specs, groups',
|
|
157
|
-
link: 'https://docs.cypress.io/faq/questions/dashboard-faq#What-happens-once-I-reach-the-test-results-limit',
|
|
158
|
-
variants: ['outline', 'solid'],
|
|
159
|
-
},
|
|
160
|
-
skipped: {
|
|
161
|
-
// <tw-keep strokeColor="gray-400" />
|
|
162
|
-
color: 'gray-400',
|
|
163
|
-
use: 'Test results',
|
|
164
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Skipped',
|
|
165
|
-
variants: ['outline'],
|
|
166
|
-
},
|
|
167
|
-
pending: {
|
|
168
|
-
// <tw-keep strokeColor="gray-300" />
|
|
169
|
-
color: 'gray-300',
|
|
170
|
-
use: 'Test results',
|
|
171
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Pending',
|
|
172
|
-
variants: ['outline'],
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* The status we have here, allow us to check the validity of the constant
|
|
177
|
-
*/
|
|
178
|
-
const statuses$3 = constStatuses;
|
|
179
|
-
|
|
180
|
-
const statuses$2 = {
|
|
181
|
-
running: {
|
|
182
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
183
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
184
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
185
|
-
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
186
|
-
size24Icon: iconsRegistry.cyStatusRunningOutlineX24,
|
|
187
|
-
},
|
|
188
|
-
failing: {
|
|
189
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
190
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
191
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
192
|
-
size16Icon: iconsRegistry.cyStatusFailingOutlineX16,
|
|
193
|
-
size24Icon: iconsRegistry.cyStatusFailingOutlineX24,
|
|
194
|
-
},
|
|
195
|
-
passed: {
|
|
196
|
-
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
197
|
-
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
198
|
-
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
199
|
-
size16Icon: iconsRegistry.cyStatusPassedOutlineX16,
|
|
200
|
-
size24Icon: iconsRegistry.cyStatusPassedOutlineX24,
|
|
201
|
-
},
|
|
202
|
-
failed: {
|
|
203
|
-
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
204
|
-
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
205
|
-
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
206
|
-
size16Icon: iconsRegistry.cyStatusFailedOutlineX16,
|
|
207
|
-
size24Icon: iconsRegistry.cyStatusFailedOutlineX24,
|
|
208
|
-
},
|
|
209
|
-
unclaimed: {
|
|
210
|
-
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
211
|
-
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
212
|
-
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
213
|
-
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
214
|
-
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24,
|
|
215
|
-
},
|
|
216
|
-
placeholder: {
|
|
217
|
-
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
218
|
-
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
219
|
-
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
220
|
-
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
221
|
-
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24,
|
|
222
|
-
},
|
|
223
|
-
cancelled: {
|
|
224
|
-
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
225
|
-
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
226
|
-
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
227
|
-
size16Icon: iconsRegistry.cyStatusCancelledOutlineX16,
|
|
228
|
-
size24Icon: iconsRegistry.cyStatusCancelledOutlineX24,
|
|
229
|
-
},
|
|
230
|
-
noTests: {
|
|
231
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
232
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
233
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
234
|
-
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
235
|
-
size24Icon: iconsRegistry.cyStatusErroredOutlineX24,
|
|
236
|
-
},
|
|
237
|
-
errored: {
|
|
238
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
239
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
240
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
241
|
-
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
242
|
-
size24Icon: iconsRegistry.cyStatusErroredOutlineX24,
|
|
243
|
-
},
|
|
244
|
-
timedOut: {
|
|
245
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
246
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
247
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
248
|
-
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
249
|
-
size24Icon: iconsRegistry.cyStatusErroredOutlineX24,
|
|
250
|
-
},
|
|
251
|
-
overLimit: {
|
|
252
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
253
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
254
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
255
|
-
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
256
|
-
size24Icon: iconsRegistry.cyStatusErroredOutlineX24,
|
|
257
|
-
},
|
|
258
|
-
skipped: {
|
|
259
|
-
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
260
|
-
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
261
|
-
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
262
|
-
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
263
|
-
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24,
|
|
264
|
-
},
|
|
265
|
-
pending: {
|
|
266
|
-
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
267
|
-
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
268
|
-
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
269
|
-
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
270
|
-
size24Icon: iconsRegistry.cyStatusPendingOutlineX24,
|
|
271
|
-
},
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
const statuses$1 = {
|
|
275
|
-
running: {
|
|
276
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
277
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
278
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
279
|
-
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
280
|
-
size24Icon: iconsRegistry.cyStatusRunningOutlineX24,
|
|
281
|
-
},
|
|
282
|
-
failing: {
|
|
283
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
284
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
285
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
286
|
-
size16Icon: iconsRegistry.cyStatusFailingOutlineX16,
|
|
287
|
-
size24Icon: iconsRegistry.cyStatusFailingOutlineX24,
|
|
288
|
-
},
|
|
289
|
-
passed: {
|
|
290
|
-
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
291
|
-
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
292
|
-
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
293
|
-
size16Icon: iconsRegistry.cyStatusPassedSimpleX16,
|
|
294
|
-
size24Icon: iconsRegistry.cyStatusPassedSimpleX24,
|
|
295
|
-
},
|
|
296
|
-
failed: {
|
|
297
|
-
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
298
|
-
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
299
|
-
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
300
|
-
size16Icon: iconsRegistry.cyStatusFailedSimpleX16,
|
|
301
|
-
size24Icon: iconsRegistry.cyStatusFailedSimpleX24,
|
|
302
|
-
},
|
|
303
|
-
unclaimed: {
|
|
304
|
-
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
305
|
-
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
306
|
-
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
307
|
-
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
308
|
-
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24,
|
|
309
|
-
},
|
|
310
|
-
placeholder: {
|
|
311
|
-
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
312
|
-
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
313
|
-
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
314
|
-
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
315
|
-
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24,
|
|
316
|
-
},
|
|
317
|
-
cancelled: {
|
|
318
|
-
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
319
|
-
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
320
|
-
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
321
|
-
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
322
|
-
size24Icon: iconsRegistry.cyStatusCancelledSolidX24,
|
|
323
|
-
},
|
|
324
|
-
noTests: {
|
|
325
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
326
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
327
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
328
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
329
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
330
|
-
},
|
|
331
|
-
errored: {
|
|
332
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
333
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
334
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
335
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
336
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
337
|
-
},
|
|
338
|
-
timedOut: {
|
|
339
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
340
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
341
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
342
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
343
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
344
|
-
},
|
|
345
|
-
overLimit: {
|
|
346
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
347
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
348
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
349
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
350
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
351
|
-
},
|
|
352
|
-
skipped: {
|
|
353
|
-
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
354
|
-
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
355
|
-
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
356
|
-
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
357
|
-
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24,
|
|
358
|
-
},
|
|
359
|
-
pending: {
|
|
360
|
-
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
361
|
-
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
362
|
-
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
363
|
-
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
364
|
-
size24Icon: iconsRegistry.cyStatusPendingOutlineX24,
|
|
365
|
-
},
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
const statuses = {
|
|
369
|
-
running: {
|
|
370
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
371
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
372
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
373
|
-
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
374
|
-
size24Icon: iconsRegistry.cyStatusRunningOutlineX24,
|
|
375
|
-
},
|
|
376
|
-
failing: {
|
|
377
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
378
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
379
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
380
|
-
size16Icon: iconsRegistry.cyStatusFailingOutlineX16,
|
|
381
|
-
size24Icon: iconsRegistry.cyStatusFailingOutlineX24,
|
|
382
|
-
},
|
|
383
|
-
passed: {
|
|
384
|
-
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
385
|
-
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
386
|
-
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
387
|
-
size16Icon: iconsRegistry.cyStatusPassedSolidX16,
|
|
388
|
-
size24Icon: iconsRegistry.cyStatusPassedSolidX24,
|
|
389
|
-
},
|
|
390
|
-
failed: {
|
|
391
|
-
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
392
|
-
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
393
|
-
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
394
|
-
size16Icon: iconsRegistry.cyStatusFailedSolidX16,
|
|
395
|
-
size24Icon: iconsRegistry.cyStatusFailedSolidX24,
|
|
396
|
-
},
|
|
397
|
-
unclaimed: {
|
|
398
|
-
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
399
|
-
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
400
|
-
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
401
|
-
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
402
|
-
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24,
|
|
403
|
-
},
|
|
404
|
-
placeholder: {
|
|
405
|
-
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
406
|
-
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
407
|
-
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
408
|
-
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
409
|
-
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24,
|
|
410
|
-
},
|
|
411
|
-
cancelled: {
|
|
412
|
-
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
413
|
-
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
414
|
-
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
415
|
-
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
416
|
-
size24Icon: iconsRegistry.cyStatusCancelledSolidX24,
|
|
417
|
-
},
|
|
418
|
-
noTests: {
|
|
419
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
420
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
421
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
422
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
423
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
424
|
-
},
|
|
425
|
-
errored: {
|
|
426
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
427
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
428
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
429
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
430
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
431
|
-
},
|
|
432
|
-
timedOut: {
|
|
433
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
434
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
435
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
436
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
437
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
438
|
-
},
|
|
439
|
-
overLimit: {
|
|
440
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
441
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
442
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
443
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
444
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
445
|
-
},
|
|
446
|
-
skipped: {
|
|
447
|
-
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
448
|
-
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
449
|
-
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
450
|
-
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
451
|
-
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24,
|
|
452
|
-
},
|
|
453
|
-
pending: {
|
|
454
|
-
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
455
|
-
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
456
|
-
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
457
|
-
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
458
|
-
size24Icon: iconsRegistry.cyStatusPendingOutlineX24,
|
|
459
|
-
},
|
|
460
|
-
};
|
|
461
|
-
|
|
462
|
-
/******************************************************************************
|
|
463
|
-
Copyright (c) Microsoft Corporation.
|
|
464
|
-
|
|
465
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
466
|
-
purpose with or without fee is hereby granted.
|
|
467
|
-
|
|
468
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
469
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
470
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
471
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
472
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
473
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
474
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
475
|
-
***************************************************************************** */
|
|
476
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
var __assign = function() {
|
|
480
|
-
__assign = Object.assign || function __assign(t) {
|
|
481
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
482
|
-
s = arguments[i];
|
|
483
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
484
|
-
}
|
|
485
|
-
return t;
|
|
486
|
-
};
|
|
487
|
-
return __assign.apply(this, arguments);
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
function __rest(s, e) {
|
|
491
|
-
var t = {};
|
|
492
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
493
|
-
t[p] = s[p];
|
|
494
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
495
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
496
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
497
|
-
t[p[i]] = s[p[i]];
|
|
498
|
-
}
|
|
499
|
-
return t;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
503
|
-
var e = new Error(message);
|
|
504
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
var compileReactIconProperties = function (_a) {
|
|
508
|
-
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"]);
|
|
509
|
-
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
510
|
-
if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
511
|
-
attrName !== 'name') {
|
|
512
|
-
// @ts-expect-error the ky of React's SVGProps is too broad and
|
|
513
|
-
// breaks here. Since we do not need to check for it. We keep the expect error
|
|
514
|
-
newAttributes[attrName] =
|
|
515
|
-
attributes[attrName];
|
|
516
|
-
}
|
|
517
|
-
return newAttributes;
|
|
518
|
-
}, {});
|
|
519
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
520
|
-
React__namespace.useEffect(function () {
|
|
521
|
-
var iconFileId = "".concat(name, "_").concat(size);
|
|
522
|
-
if (defs) {
|
|
523
|
-
if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
|
|
524
|
-
return;
|
|
525
|
-
}
|
|
526
|
-
var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
527
|
-
svgElement.setAttribute('data-cy-svg-defs', iconFileId);
|
|
528
|
-
svgElement.setAttribute('width', '0');
|
|
529
|
-
svgElement.setAttribute('height', '0');
|
|
530
|
-
svgElement.innerHTML = defs;
|
|
531
|
-
document.body.appendChild(svgElement);
|
|
532
|
-
}
|
|
533
|
-
}, [defs, name, size]);
|
|
534
|
-
var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
535
|
-
__html: alt
|
|
536
|
-
? "<title>".concat(alt.replace(/[><]/g, function (s) {
|
|
537
|
-
return s === '>' ? '>' : '<';
|
|
538
|
-
}), "</title>").concat(body)
|
|
539
|
-
: body,
|
|
540
|
-
}, className: undefined }, filteredAttributes);
|
|
541
|
-
if (attributes.className) {
|
|
542
|
-
compiledClasses.push(attributes.className);
|
|
543
|
-
}
|
|
544
|
-
if (compiledClasses.length) {
|
|
545
|
-
componentProps.className = compiledClasses.join(' ');
|
|
546
|
-
}
|
|
547
|
-
return componentProps;
|
|
548
|
-
};
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
/* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
|
|
552
|
-
|
|
553
84
|
var compileProps = function (_a) {
|
|
554
85
|
var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size, variantName = _a.variantName;
|
|
555
86
|
var statusInfo = status ? statuses[status] : statuses.placeholder;
|
|
556
|
-
var iconInfo = status ? statuses
|
|
87
|
+
var iconInfo = status ? constantsStatusicon.statuses[status] : constantsStatusicon.statuses.placeholder;
|
|
557
88
|
var iconData = statusInfo["size".concat(size, "Icon")].data;
|
|
558
89
|
var classes = "inline-block ".concat(className || '');
|
|
559
|
-
var compiledClasses =
|
|
90
|
+
var compiledClasses = iconRegistry.getComponentAttributes({
|
|
560
91
|
strokeColor: iconInfo.color,
|
|
561
92
|
size: size,
|
|
562
93
|
availableSizes: [size],
|
|
563
94
|
fillColor: iconInfo.secondaryColor,
|
|
564
95
|
}).compiledClasses;
|
|
565
|
-
return compileReactIconProperties({
|
|
96
|
+
return reactIcon.compileReactIconProperties({
|
|
566
97
|
body: iconData,
|
|
567
98
|
compiledClasses: __spreadArray(__spreadArray([], compiledClasses, true), [classes], false),
|
|
568
99
|
size: size,
|
|
@@ -571,10 +102,10 @@ var compileProps = function (_a) {
|
|
|
571
102
|
};
|
|
572
103
|
|
|
573
104
|
var OutlineStatusIcon = function (_a) {
|
|
574
|
-
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest
|
|
575
|
-
return React__namespace.createElement('svg', __assign
|
|
105
|
+
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest(_a, ["size", "status"]);
|
|
106
|
+
return React__namespace.createElement('svg', __assign(__assign({}, rest), compileProps({
|
|
576
107
|
status: status,
|
|
577
|
-
statuses: statuses
|
|
108
|
+
statuses: constantsStatusicon.outline.statuses,
|
|
578
109
|
className: rest.className,
|
|
579
110
|
size: size,
|
|
580
111
|
variantName: 'outline',
|
|
@@ -582,10 +113,10 @@ var OutlineStatusIcon = function (_a) {
|
|
|
582
113
|
};
|
|
583
114
|
|
|
584
115
|
var SimpleStatusIcon = function (_a) {
|
|
585
|
-
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest
|
|
586
|
-
return React__namespace.createElement('svg', __assign
|
|
116
|
+
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest(_a, ["size", "status"]);
|
|
117
|
+
return React__namespace.createElement('svg', __assign(__assign({}, rest), compileProps({
|
|
587
118
|
status: status,
|
|
588
|
-
statuses: statuses
|
|
119
|
+
statuses: constantsStatusicon.simple.statuses,
|
|
589
120
|
className: rest.className,
|
|
590
121
|
size: size,
|
|
591
122
|
variantName: 'simple',
|
|
@@ -593,10 +124,10 @@ var SimpleStatusIcon = function (_a) {
|
|
|
593
124
|
};
|
|
594
125
|
|
|
595
126
|
var SolidStatusIcon = function (_a) {
|
|
596
|
-
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest
|
|
597
|
-
return React__namespace.createElement('svg', __assign
|
|
127
|
+
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest(_a, ["size", "status"]);
|
|
128
|
+
return React__namespace.createElement('svg', __assign(__assign({}, rest), compileProps({
|
|
598
129
|
status: status,
|
|
599
|
-
statuses: statuses,
|
|
130
|
+
statuses: constantsStatusicon.solid.statuses,
|
|
600
131
|
className: rest.className,
|
|
601
132
|
size: size,
|
|
602
133
|
variantName: 'solid',
|
|
@@ -604,14 +135,14 @@ var SolidStatusIcon = function (_a) {
|
|
|
604
135
|
};
|
|
605
136
|
|
|
606
137
|
var StatusIcon = function (_a) {
|
|
607
|
-
var _b = _a.size, size = _b === void 0 ? '24' : _b, status = _a.status, _c = _a.variant, variant = _c === void 0 ? 'simple' : _c, rest = __rest
|
|
138
|
+
var _b = _a.size, size = _b === void 0 ? '24' : _b, status = _a.status, _c = _a.variant, variant = _c === void 0 ? 'simple' : _c, rest = __rest(_a, ["size", "status", "variant"]);
|
|
608
139
|
if (variant === 'outline') {
|
|
609
|
-
return React__namespace.createElement(OutlineStatusIcon, __assign
|
|
140
|
+
return React__namespace.createElement(OutlineStatusIcon, __assign({ size: size, status: status }, rest));
|
|
610
141
|
}
|
|
611
142
|
if (variant === 'simple') {
|
|
612
|
-
return React__namespace.createElement(SimpleStatusIcon, __assign
|
|
143
|
+
return React__namespace.createElement(SimpleStatusIcon, __assign({ size: size, status: status }, rest));
|
|
613
144
|
}
|
|
614
|
-
return React__namespace.createElement(SolidStatusIcon, __assign
|
|
145
|
+
return React__namespace.createElement(SolidStatusIcon, __assign({ size: size, status: status }, rest));
|
|
615
146
|
};
|
|
616
147
|
|
|
617
148
|
exports.OutlineStatusIcon = OutlineStatusIcon;
|
|
@@ -620,4 +151,4 @@ exports.SolidStatusIcon = SolidStatusIcon;
|
|
|
620
151
|
exports.default = StatusIcon;
|
|
621
152
|
//# sourceMappingURL=index.umd.js.map
|
|
622
153
|
|
|
623
|
-
/* <wind-keep class="outline inline-block
|
|
154
|
+
/* <wind-keep class="outline inline-block"> */
|