@cypress-design/react-statusicon 0.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/CHANGELOG.md +11 -0
- package/OutlineStatusIcon.ts +21 -0
- package/ReadMe.md +35 -0
- package/SimpleStatusIcon.ts +21 -0
- package/SolidStatusIcon.ts +21 -0
- package/StatusIcon.rootstory.tsx +85 -0
- package/StatusIcon.stories.mdx +134 -0
- package/StatusIcon.tsx +38 -0
- package/StatusIconReact.cy.tsx +75 -0
- package/compileProps.ts +26 -0
- package/dist/constants.d.ts +104 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/index.es.js +455 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +482 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/outline-imports.d.ts +3 -0
- package/dist/outline-imports.d.ts.map +1 -0
- package/dist/react/OutlineStatusIcon.d.ts +6 -0
- package/dist/react/OutlineStatusIcon.d.ts.map +1 -0
- package/dist/react/SimpleStatusIcon.d.ts +6 -0
- package/dist/react/SimpleStatusIcon.d.ts.map +1 -0
- package/dist/react/SolidStatusIcon.d.ts +6 -0
- package/dist/react/SolidStatusIcon.d.ts.map +1 -0
- package/dist/react/StatusIcon.d.ts +21 -0
- package/dist/react/StatusIcon.d.ts.map +1 -0
- package/dist/react/compileProps.d.ts +6 -0
- package/dist/react/compileProps.d.ts.map +1 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/simple-imports.d.ts +3 -0
- package/dist/simple-imports.d.ts.map +1 -0
- package/dist/solid-imports.d.ts +3 -0
- package/dist/solid-imports.d.ts.map +1 -0
- package/index.ts +4 -0
- package/package.json +27 -0
- package/rollup.config.js +3 -0
- package/tsconfig.build.json +8 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var iconsRegistry = require('@cypress-design/icon-registry');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
/******************************************************************************
|
|
29
|
+
Copyright (c) Microsoft Corporation.
|
|
30
|
+
|
|
31
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
32
|
+
purpose with or without fee is hereby granted.
|
|
33
|
+
|
|
34
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
35
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
36
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
37
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
38
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
39
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
40
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
41
|
+
***************************************************************************** */
|
|
42
|
+
|
|
43
|
+
var __assign$1 = function() {
|
|
44
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
45
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
46
|
+
s = arguments[i];
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
};
|
|
51
|
+
return __assign$1.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function __rest$1(s, e) {
|
|
55
|
+
var t = {};
|
|
56
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
57
|
+
t[p] = s[p];
|
|
58
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
59
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
60
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
61
|
+
t[p[i]] = s[p[i]];
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var statuses$2 = {
|
|
67
|
+
running: {
|
|
68
|
+
shouldSpin: true,
|
|
69
|
+
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
70
|
+
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
71
|
+
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
72
|
+
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
73
|
+
size24Icon: iconsRegistry.cyStatusRunningOutlineX24
|
|
74
|
+
},
|
|
75
|
+
passed: {
|
|
76
|
+
shouldSpin: false,
|
|
77
|
+
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
78
|
+
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
79
|
+
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
80
|
+
size16Icon: iconsRegistry.cyStatusPassedOutlineX16,
|
|
81
|
+
size24Icon: iconsRegistry.cyStatusPassedOutlineX24
|
|
82
|
+
},
|
|
83
|
+
failed: {
|
|
84
|
+
shouldSpin: false,
|
|
85
|
+
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
86
|
+
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
87
|
+
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
88
|
+
size16Icon: iconsRegistry.cyStatusFailedOutlineX16,
|
|
89
|
+
size24Icon: iconsRegistry.cyStatusFailedOutlineX24
|
|
90
|
+
},
|
|
91
|
+
unclaimed: {
|
|
92
|
+
shouldSpin: false,
|
|
93
|
+
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
94
|
+
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
95
|
+
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
96
|
+
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
97
|
+
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24
|
|
98
|
+
},
|
|
99
|
+
placeholder: {
|
|
100
|
+
shouldSpin: false,
|
|
101
|
+
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
102
|
+
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
103
|
+
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
104
|
+
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
105
|
+
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24
|
|
106
|
+
},
|
|
107
|
+
cancelled: {
|
|
108
|
+
shouldSpin: false,
|
|
109
|
+
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
110
|
+
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
111
|
+
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
112
|
+
size16Icon: iconsRegistry.cyStatusCancelledOutlineX16,
|
|
113
|
+
size24Icon: iconsRegistry.cyStatusCancelledOutlineX24
|
|
114
|
+
},
|
|
115
|
+
noTests: {
|
|
116
|
+
shouldSpin: false,
|
|
117
|
+
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
118
|
+
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
119
|
+
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
120
|
+
size16Icon: iconsRegistry.cyStatusCancelledOutlineX16,
|
|
121
|
+
size24Icon: iconsRegistry.cyStatusCancelledOutlineX24
|
|
122
|
+
},
|
|
123
|
+
errored: {
|
|
124
|
+
shouldSpin: false,
|
|
125
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
126
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
127
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
128
|
+
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
129
|
+
size24Icon: iconsRegistry.cyStatusErroredOutlineX24
|
|
130
|
+
},
|
|
131
|
+
timedOut: {
|
|
132
|
+
shouldSpin: false,
|
|
133
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
134
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
135
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
136
|
+
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
137
|
+
size24Icon: iconsRegistry.cyStatusErroredOutlineX24
|
|
138
|
+
},
|
|
139
|
+
overLimit: {
|
|
140
|
+
shouldSpin: false,
|
|
141
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
142
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
143
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
144
|
+
size16Icon: iconsRegistry.cyStatusErroredOutlineX16,
|
|
145
|
+
size24Icon: iconsRegistry.cyStatusErroredOutlineX24
|
|
146
|
+
},
|
|
147
|
+
skipped: {
|
|
148
|
+
shouldSpin: false,
|
|
149
|
+
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
150
|
+
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
151
|
+
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
152
|
+
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
153
|
+
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24
|
|
154
|
+
},
|
|
155
|
+
pending: {
|
|
156
|
+
shouldSpin: false,
|
|
157
|
+
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
158
|
+
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
159
|
+
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
160
|
+
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
161
|
+
size24Icon: iconsRegistry.cyStatusPendingOutlineX24
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/******************************************************************************
|
|
166
|
+
Copyright (c) Microsoft Corporation.
|
|
167
|
+
|
|
168
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
169
|
+
purpose with or without fee is hereby granted.
|
|
170
|
+
|
|
171
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
172
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
173
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
174
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
175
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
176
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
177
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
178
|
+
***************************************************************************** */
|
|
179
|
+
|
|
180
|
+
var __assign = function() {
|
|
181
|
+
__assign = Object.assign || function __assign(t) {
|
|
182
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
183
|
+
s = arguments[i];
|
|
184
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
185
|
+
}
|
|
186
|
+
return t;
|
|
187
|
+
};
|
|
188
|
+
return __assign.apply(this, arguments);
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
function __rest(s, e) {
|
|
192
|
+
var t = {};
|
|
193
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
194
|
+
t[p] = s[p];
|
|
195
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
196
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
197
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
198
|
+
t[p[i]] = s[p[i]];
|
|
199
|
+
}
|
|
200
|
+
return t;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
var compileReactIconProperties = function (_a) {
|
|
204
|
+
var body = _a.body, compiledClasses = _a.compiledClasses, size = _a.size, attributes = __rest(_a, ["body", "compiledClasses", "size"]);
|
|
205
|
+
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
206
|
+
if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName)) {
|
|
207
|
+
newAttributes[attrName] =
|
|
208
|
+
attributes[attrName];
|
|
209
|
+
}
|
|
210
|
+
return newAttributes;
|
|
211
|
+
}, {});
|
|
212
|
+
var componentProps = __assign({ width: size, height: size, fill: 'none', dangerouslySetInnerHTML: {
|
|
213
|
+
__html: body
|
|
214
|
+
} }, filteredAttributes);
|
|
215
|
+
if (attributes.className) {
|
|
216
|
+
compiledClasses.push(attributes.className);
|
|
217
|
+
}
|
|
218
|
+
if (compiledClasses.length) {
|
|
219
|
+
componentProps.className = compiledClasses.join(' ');
|
|
220
|
+
}
|
|
221
|
+
return componentProps;
|
|
222
|
+
};
|
|
223
|
+
/* <windicss-keep class=""> */
|
|
224
|
+
|
|
225
|
+
var compileProps = function (_a) {
|
|
226
|
+
var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size;
|
|
227
|
+
var statusInfo = status ? statuses[status] : statuses.placeholder;
|
|
228
|
+
var icon = statusInfo["size" + size + "Icon"];
|
|
229
|
+
var classes = "inline-block " + (className || '') + " " + (statusInfo.shouldSpin && size !== '4' ? 'animate-spin' : '');
|
|
230
|
+
return compileReactIconProperties({
|
|
231
|
+
body: icon.data,
|
|
232
|
+
compiledClasses: [classes],
|
|
233
|
+
size: size
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
var OutlineStatusIcon = function (_a) {
|
|
238
|
+
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"]);
|
|
239
|
+
return React__namespace.createElement('svg', compileProps({
|
|
240
|
+
status: status,
|
|
241
|
+
statuses: statuses$2,
|
|
242
|
+
className: rest.className,
|
|
243
|
+
size: size
|
|
244
|
+
}));
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
var statuses$1 = {
|
|
248
|
+
running: {
|
|
249
|
+
shouldSpin: true,
|
|
250
|
+
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
251
|
+
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
252
|
+
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
253
|
+
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
254
|
+
size24Icon: iconsRegistry.cyStatusRunningOutlineX24
|
|
255
|
+
},
|
|
256
|
+
passed: {
|
|
257
|
+
shouldSpin: false,
|
|
258
|
+
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
259
|
+
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
260
|
+
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
261
|
+
size16Icon: iconsRegistry.cyStatusPassedSimpleX16,
|
|
262
|
+
size24Icon: iconsRegistry.cyStatusPassedSimpleX24
|
|
263
|
+
},
|
|
264
|
+
failed: {
|
|
265
|
+
shouldSpin: false,
|
|
266
|
+
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
267
|
+
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
268
|
+
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
269
|
+
size16Icon: iconsRegistry.cyStatusFailedSimpleX16,
|
|
270
|
+
size24Icon: iconsRegistry.cyStatusFailedSimpleX24
|
|
271
|
+
},
|
|
272
|
+
unclaimed: {
|
|
273
|
+
shouldSpin: false,
|
|
274
|
+
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
275
|
+
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
276
|
+
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
277
|
+
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
278
|
+
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24
|
|
279
|
+
},
|
|
280
|
+
placeholder: {
|
|
281
|
+
shouldSpin: false,
|
|
282
|
+
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
283
|
+
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
284
|
+
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
285
|
+
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
286
|
+
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24
|
|
287
|
+
},
|
|
288
|
+
cancelled: {
|
|
289
|
+
shouldSpin: false,
|
|
290
|
+
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
291
|
+
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
292
|
+
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
293
|
+
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
294
|
+
size24Icon: iconsRegistry.cyStatusCancelledSolidX24
|
|
295
|
+
},
|
|
296
|
+
noTests: {
|
|
297
|
+
shouldSpin: false,
|
|
298
|
+
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
299
|
+
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
300
|
+
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
301
|
+
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
302
|
+
size24Icon: iconsRegistry.cyStatusCancelledSolidX24
|
|
303
|
+
},
|
|
304
|
+
errored: {
|
|
305
|
+
shouldSpin: false,
|
|
306
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
307
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
308
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
309
|
+
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
310
|
+
size24Icon: iconsRegistry.cyStatusErroredSolidX24
|
|
311
|
+
},
|
|
312
|
+
timedOut: {
|
|
313
|
+
shouldSpin: false,
|
|
314
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
315
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
316
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
317
|
+
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
318
|
+
size24Icon: iconsRegistry.cyStatusErroredSolidX24
|
|
319
|
+
},
|
|
320
|
+
overLimit: {
|
|
321
|
+
shouldSpin: false,
|
|
322
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
323
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
324
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
325
|
+
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
326
|
+
size24Icon: iconsRegistry.cyStatusErroredSolidX24
|
|
327
|
+
},
|
|
328
|
+
skipped: {
|
|
329
|
+
shouldSpin: false,
|
|
330
|
+
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
331
|
+
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
332
|
+
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
333
|
+
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
334
|
+
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24
|
|
335
|
+
},
|
|
336
|
+
pending: {
|
|
337
|
+
shouldSpin: false,
|
|
338
|
+
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
339
|
+
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
340
|
+
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
341
|
+
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
342
|
+
size24Icon: iconsRegistry.cyStatusPendingOutlineX24
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
var SimpleStatusIcon = function (_a) {
|
|
347
|
+
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"]);
|
|
348
|
+
return React__namespace.createElement('svg', compileProps({
|
|
349
|
+
status: status,
|
|
350
|
+
statuses: statuses$1,
|
|
351
|
+
className: rest.className,
|
|
352
|
+
size: size
|
|
353
|
+
}));
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
var statuses = {
|
|
357
|
+
running: {
|
|
358
|
+
shouldSpin: true,
|
|
359
|
+
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
360
|
+
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
361
|
+
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
362
|
+
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
363
|
+
size24Icon: iconsRegistry.cyStatusRunningOutlineX24
|
|
364
|
+
},
|
|
365
|
+
passed: {
|
|
366
|
+
shouldSpin: false,
|
|
367
|
+
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
368
|
+
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
369
|
+
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
370
|
+
size16Icon: iconsRegistry.cyStatusPassedSolidX16,
|
|
371
|
+
size24Icon: iconsRegistry.cyStatusPassedSolidX24
|
|
372
|
+
},
|
|
373
|
+
failed: {
|
|
374
|
+
shouldSpin: false,
|
|
375
|
+
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
376
|
+
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
377
|
+
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
378
|
+
size16Icon: iconsRegistry.cyStatusFailedSolidX16,
|
|
379
|
+
size24Icon: iconsRegistry.cyStatusFailedSolidX24
|
|
380
|
+
},
|
|
381
|
+
unclaimed: {
|
|
382
|
+
shouldSpin: false,
|
|
383
|
+
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
384
|
+
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
385
|
+
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
386
|
+
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
387
|
+
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24
|
|
388
|
+
},
|
|
389
|
+
placeholder: {
|
|
390
|
+
shouldSpin: false,
|
|
391
|
+
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
392
|
+
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
393
|
+
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
394
|
+
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
395
|
+
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24
|
|
396
|
+
},
|
|
397
|
+
cancelled: {
|
|
398
|
+
shouldSpin: false,
|
|
399
|
+
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
400
|
+
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
401
|
+
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
402
|
+
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
403
|
+
size24Icon: iconsRegistry.cyStatusCancelledSolidX24
|
|
404
|
+
},
|
|
405
|
+
noTests: {
|
|
406
|
+
shouldSpin: false,
|
|
407
|
+
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
408
|
+
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
409
|
+
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
410
|
+
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
411
|
+
size24Icon: iconsRegistry.cyStatusCancelledSolidX24
|
|
412
|
+
},
|
|
413
|
+
errored: {
|
|
414
|
+
shouldSpin: false,
|
|
415
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
416
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
417
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
418
|
+
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
419
|
+
size24Icon: iconsRegistry.cyStatusErroredSolidX24
|
|
420
|
+
},
|
|
421
|
+
timedOut: {
|
|
422
|
+
shouldSpin: false,
|
|
423
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
424
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
425
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
426
|
+
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
427
|
+
size24Icon: iconsRegistry.cyStatusErroredSolidX24
|
|
428
|
+
},
|
|
429
|
+
overLimit: {
|
|
430
|
+
shouldSpin: false,
|
|
431
|
+
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
432
|
+
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
433
|
+
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
434
|
+
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
435
|
+
size24Icon: iconsRegistry.cyStatusErroredSolidX24
|
|
436
|
+
},
|
|
437
|
+
skipped: {
|
|
438
|
+
shouldSpin: false,
|
|
439
|
+
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
440
|
+
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
441
|
+
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
442
|
+
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
443
|
+
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24
|
|
444
|
+
},
|
|
445
|
+
pending: {
|
|
446
|
+
shouldSpin: false,
|
|
447
|
+
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
448
|
+
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
449
|
+
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
450
|
+
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
451
|
+
size24Icon: iconsRegistry.cyStatusPendingOutlineX24
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
var SolidStatusIcon = function (_a) {
|
|
456
|
+
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"]);
|
|
457
|
+
return React__namespace.createElement('svg', compileProps({
|
|
458
|
+
status: status,
|
|
459
|
+
statuses: statuses,
|
|
460
|
+
className: rest.className,
|
|
461
|
+
size: size
|
|
462
|
+
}));
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
var StatusIcon = function (_a) {
|
|
466
|
+
var _b = _a.size, size = _b === void 0 ? '24' : _b, status = _a.status, _c = _a.variant, variant = _c === void 0 ? 'simple' : _c, rest = __rest$1(_a, ["size", "status", "variant"]);
|
|
467
|
+
if (variant === 'outline') {
|
|
468
|
+
return React__namespace.createElement(OutlineStatusIcon, __assign$1({ size: size, status: status }, rest));
|
|
469
|
+
}
|
|
470
|
+
if (variant === 'simple') {
|
|
471
|
+
return React__namespace.createElement(SimpleStatusIcon, __assign$1({ size: size, status: status }, rest));
|
|
472
|
+
}
|
|
473
|
+
return React__namespace.createElement(SolidStatusIcon, __assign$1({ size: size, status: status }, rest));
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
exports.OutlineStatusIcon = OutlineStatusIcon;
|
|
477
|
+
exports.SimpleStatusIcon = SimpleStatusIcon;
|
|
478
|
+
exports.SolidStatusIcon = SolidStatusIcon;
|
|
479
|
+
exports["default"] = StatusIcon;
|
|
480
|
+
/* <windicss-keep class="outline inline-block animate-spin"> */
|
|
481
|
+
|
|
482
|
+
//# sourceMappingURL=index.umd.js.map
|