@cypress-design/react-statusicon 0.0.8 → 0.0.10
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 +18 -0
- package/compileProps.ts +16 -4
- package/dist/constants.d.ts +6 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.es.mjs +116 -44
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +115 -43
- package/dist/index.umd.js.map +1 -1
- package/dist/outline-imports.d.ts.map +1 -1
- package/dist/react/compileProps.d.ts.map +1 -1
- package/dist/simple-imports.d.ts.map +1 -1
- package/dist/solid-imports.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @cypress-design/react-statusicon
|
|
2
2
|
|
|
3
|
+
## 0.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98](https://github.com/cypress-io/cypress-design/pull/98) [`f41d962`](https://github.com/cypress-io/cypress-design/commit/f41d962b3331767e89a74f0dc6ba207b11ff6226) Thanks [@elevatebart](https://github.com/elevatebart)! - refactor: status colors should be in status icons
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`f41d962`](https://github.com/cypress-io/cypress-design/commit/f41d962b3331767e89a74f0dc6ba207b11ff6226)]:
|
|
10
|
+
- @cypress-design/react-icon@0.10.1
|
|
11
|
+
- @cypress-design/icon-registry@0.12.1
|
|
12
|
+
|
|
13
|
+
## 0.0.9
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`40da4a4`](https://github.com/cypress-io/cypress-design/commit/40da4a4b4e9210c1ff1c526eed0b74f77df10d55)]:
|
|
18
|
+
- @cypress-design/icon-registry@0.12.0
|
|
19
|
+
- @cypress-design/react-icon@0.10.0
|
|
20
|
+
|
|
3
21
|
## 0.0.8
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/compileProps.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IconSet, VariantStatusIconProps } from '../constants'
|
|
2
|
+
import { statuses as StatusForColor } from '../constants'
|
|
2
3
|
import { compileReactIconProperties } from '@cypress-design/react-icon'
|
|
4
|
+
import { getComponentAttributes } from '@cypress-design/icon-registry'
|
|
3
5
|
|
|
4
6
|
export const compileProps = ({
|
|
5
7
|
status,
|
|
@@ -12,15 +14,25 @@ export const compileProps = ({
|
|
|
12
14
|
}) => {
|
|
13
15
|
const statusInfo = status ? statuses[status] : statuses.placeholder
|
|
14
16
|
|
|
15
|
-
const
|
|
17
|
+
const iconInfo = status ? StatusForColor[status] : StatusForColor.placeholder
|
|
18
|
+
|
|
19
|
+
const { data: iconData, name } = statusInfo[`size${size}Icon`]
|
|
16
20
|
|
|
17
21
|
const classes = `inline-block ${className || ''} ${
|
|
18
|
-
|
|
22
|
+
iconInfo.shouldSpin && size !== '4' ? 'animate-spin' : ''
|
|
19
23
|
}`
|
|
20
24
|
|
|
25
|
+
const { compiledClasses } = getComponentAttributes({
|
|
26
|
+
name,
|
|
27
|
+
strokeColor: iconInfo.color,
|
|
28
|
+
size,
|
|
29
|
+
availableSizes: [size],
|
|
30
|
+
fillColor: iconInfo.secondaryColor,
|
|
31
|
+
})
|
|
32
|
+
|
|
21
33
|
return compileReactIconProperties({
|
|
22
|
-
body:
|
|
23
|
-
compiledClasses: [classes],
|
|
34
|
+
body: iconData,
|
|
35
|
+
compiledClasses: [...compiledClasses, classes],
|
|
24
36
|
size,
|
|
25
37
|
})
|
|
26
38
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
import type { WindiColor } from '@cypress-design/icon-registry';
|
|
1
2
|
export declare type Variant = 'outline' | 'simple' | 'solid';
|
|
2
3
|
export declare type Size = '4' | '8' | '12' | '16' | '24';
|
|
3
4
|
declare type StatusInfo = {
|
|
4
|
-
color:
|
|
5
|
+
color: WindiColor;
|
|
5
6
|
link?: string;
|
|
6
7
|
use: string;
|
|
7
8
|
variants: readonly Variant[];
|
|
9
|
+
secondaryColor?: WindiColor;
|
|
10
|
+
shouldSpin?: boolean;
|
|
8
11
|
};
|
|
9
12
|
export declare type IconContents = {
|
|
10
13
|
name: string;
|
|
11
14
|
data: string;
|
|
12
15
|
};
|
|
13
16
|
export declare type IconSet = {
|
|
14
|
-
shouldSpin: boolean;
|
|
15
17
|
size4Icon: IconContents;
|
|
16
18
|
size8Icon: IconContents;
|
|
17
19
|
size12Icon: IconContents;
|
|
@@ -26,6 +28,8 @@ declare const constStatuses: {
|
|
|
26
28
|
readonly color: "indigo-400";
|
|
27
29
|
readonly use: "Runs, specs, groups, test results";
|
|
28
30
|
readonly variants: readonly ["outline"];
|
|
31
|
+
readonly secondaryColor: "gray-100";
|
|
32
|
+
readonly shouldSpin: true;
|
|
29
33
|
};
|
|
30
34
|
readonly passed: {
|
|
31
35
|
readonly color: "jade-400";
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../constants.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpD,oBAAY,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEjD,aAAK,UAAU,GAAG;IAChB,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC/D,oBAAY,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpD,oBAAY,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEjD,aAAK,UAAU,GAAG;IAChB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,oBAAY,OAAO,GAAG;IACpB,SAAS,EAAE,YAAY,CAAA;IACvB,SAAS,EAAE,YAAY,CAAA;IACvB,UAAU,EAAE,YAAY,CAAA;IACxB,UAAU,EAAE,YAAY,CAAA;IACxB,UAAU,EAAE,YAAY,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFT,CAAA;AAEV,oBAAY,WAAW,GAAG,MAAM,OAAO,aAAa,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,UAAU,CAAiB,CAAA;AAEtE,oBAAY,sBAAsB,GAAG;IACnC,IAAI,EAAE,IAAI,CAAA;IACV;;MAEE;IACF,MAAM,CAAC,EAAE,MAAM,OAAO,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAA;CAClD,CAAA"}
|
package/dist/index.es.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { cyStatusRunningSimpleX4, cyStatusRunningSimpleX8, cyStatusRunningOutlineX12, cyStatusRunningOutlineX16, cyStatusRunningOutlineX24, cyStatusPassedSimpleX4, cyStatusPassedSimpleX8, cyStatusPassedSimpleX12, cyStatusPassedOutlineX16, cyStatusPassedOutlineX24, cyStatusFailedSimpleX4, cyStatusFailedSimpleX8, cyStatusFailedSimpleX12, cyStatusFailedOutlineX16, cyStatusFailedOutlineX24, cyStatusQueuedSimpleX4, cyStatusQueuedSimpleX8, cyStatusQueuedOutlineX12, cyStatusQueuedOutlineX16, cyStatusQueuedOutlineX24, cyStatusPlaceholderSimpleX4, cyStatusPlaceholderSimpleX8, cyStatusPlaceholderSolidX12, cyStatusPlaceholderSolidX16, cyStatusPlaceholderSolidX24, cyStatusCancelledSimpleX4, cyStatusCancelledSimpleX8, cyStatusCancelledSolidX12, cyStatusCancelledOutlineX16, cyStatusCancelledOutlineX24, cyStatusErroredSimpleX4, cyStatusErroredSimpleX8, cyStatusErroredSolidX12, cyStatusErroredOutlineX16, cyStatusErroredOutlineX24, cyStatusSkippedSimpleX4, cyStatusSkippedSimpleX8, cyStatusSkippedOutlineX12, cyStatusSkippedOutlineX16, cyStatusSkippedOutlineX24, cyStatusPendingSimpleX4, cyStatusPendingSimpleX8, cyStatusPendingOutlineX12, cyStatusPendingOutlineX16, cyStatusPendingOutlineX24, ICON_COLOR_PROP_NAMES, cyStatusPassedSimpleX16, cyStatusPassedSimpleX24, cyStatusFailedSimpleX16, cyStatusFailedSimpleX24, cyStatusCancelledSolidX16, cyStatusCancelledSolidX24, cyStatusErroredSolidX16, cyStatusErroredSolidX24, cyStatusPassedSolidX16, cyStatusPassedSolidX24, cyStatusFailedSolidX16, cyStatusFailedSolidX24 } from '@cypress-design/icon-registry';
|
|
2
|
+
import { cyStatusRunningSimpleX4, cyStatusRunningSimpleX8, cyStatusRunningOutlineX12, cyStatusRunningOutlineX16, cyStatusRunningOutlineX24, cyStatusPassedSimpleX4, cyStatusPassedSimpleX8, cyStatusPassedSimpleX12, cyStatusPassedOutlineX16, cyStatusPassedOutlineX24, cyStatusFailedSimpleX4, cyStatusFailedSimpleX8, cyStatusFailedSimpleX12, cyStatusFailedOutlineX16, cyStatusFailedOutlineX24, cyStatusQueuedSimpleX4, cyStatusQueuedSimpleX8, cyStatusQueuedOutlineX12, cyStatusQueuedOutlineX16, cyStatusQueuedOutlineX24, cyStatusPlaceholderSimpleX4, cyStatusPlaceholderSimpleX8, cyStatusPlaceholderSolidX12, cyStatusPlaceholderSolidX16, cyStatusPlaceholderSolidX24, cyStatusCancelledSimpleX4, cyStatusCancelledSimpleX8, cyStatusCancelledSolidX12, cyStatusCancelledOutlineX16, cyStatusCancelledOutlineX24, cyStatusErroredSimpleX4, cyStatusErroredSimpleX8, cyStatusErroredSolidX12, cyStatusErroredOutlineX16, cyStatusErroredOutlineX24, cyStatusSkippedSimpleX4, cyStatusSkippedSimpleX8, cyStatusSkippedOutlineX12, cyStatusSkippedOutlineX16, cyStatusSkippedOutlineX24, cyStatusPendingSimpleX4, cyStatusPendingSimpleX8, cyStatusPendingOutlineX12, cyStatusPendingOutlineX16, cyStatusPendingOutlineX24, ICON_COLOR_PROP_NAMES, getComponentAttributes, cyStatusPassedSimpleX16, cyStatusPassedSimpleX24, cyStatusFailedSimpleX16, cyStatusFailedSimpleX24, cyStatusCancelledSolidX16, cyStatusCancelledSolidX24, cyStatusErroredSolidX16, cyStatusErroredSolidX24, cyStatusPassedSolidX16, cyStatusPassedSolidX24, cyStatusFailedSolidX16, cyStatusFailedSolidX24 } from '@cypress-design/icon-registry';
|
|
3
3
|
|
|
4
4
|
/******************************************************************************
|
|
5
5
|
Copyright (c) Microsoft Corporation.
|
|
@@ -37,11 +37,20 @@ function __rest$1(s, e) {
|
|
|
37
37
|
t[p[i]] = s[p[i]];
|
|
38
38
|
}
|
|
39
39
|
return t;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function __spreadArray(to, from, pack) {
|
|
43
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
44
|
+
if (ar || !(i in from)) {
|
|
45
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
46
|
+
ar[i] = from[i];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
var statuses$
|
|
52
|
+
var statuses$3 = {
|
|
43
53
|
running: {
|
|
44
|
-
shouldSpin: true,
|
|
45
54
|
size4Icon: cyStatusRunningSimpleX4,
|
|
46
55
|
size8Icon: cyStatusRunningSimpleX8,
|
|
47
56
|
size12Icon: cyStatusRunningOutlineX12,
|
|
@@ -49,7 +58,6 @@ var statuses$2 = {
|
|
|
49
58
|
size24Icon: cyStatusRunningOutlineX24
|
|
50
59
|
},
|
|
51
60
|
passed: {
|
|
52
|
-
shouldSpin: false,
|
|
53
61
|
size4Icon: cyStatusPassedSimpleX4,
|
|
54
62
|
size8Icon: cyStatusPassedSimpleX8,
|
|
55
63
|
size12Icon: cyStatusPassedSimpleX12,
|
|
@@ -57,7 +65,6 @@ var statuses$2 = {
|
|
|
57
65
|
size24Icon: cyStatusPassedOutlineX24
|
|
58
66
|
},
|
|
59
67
|
failed: {
|
|
60
|
-
shouldSpin: false,
|
|
61
68
|
size4Icon: cyStatusFailedSimpleX4,
|
|
62
69
|
size8Icon: cyStatusFailedSimpleX8,
|
|
63
70
|
size12Icon: cyStatusFailedSimpleX12,
|
|
@@ -65,7 +72,6 @@ var statuses$2 = {
|
|
|
65
72
|
size24Icon: cyStatusFailedOutlineX24
|
|
66
73
|
},
|
|
67
74
|
unclaimed: {
|
|
68
|
-
shouldSpin: false,
|
|
69
75
|
size4Icon: cyStatusQueuedSimpleX4,
|
|
70
76
|
size8Icon: cyStatusQueuedSimpleX8,
|
|
71
77
|
size12Icon: cyStatusQueuedOutlineX12,
|
|
@@ -73,7 +79,6 @@ var statuses$2 = {
|
|
|
73
79
|
size24Icon: cyStatusQueuedOutlineX24
|
|
74
80
|
},
|
|
75
81
|
placeholder: {
|
|
76
|
-
shouldSpin: false,
|
|
77
82
|
size4Icon: cyStatusPlaceholderSimpleX4,
|
|
78
83
|
size8Icon: cyStatusPlaceholderSimpleX8,
|
|
79
84
|
size12Icon: cyStatusPlaceholderSolidX12,
|
|
@@ -81,7 +86,6 @@ var statuses$2 = {
|
|
|
81
86
|
size24Icon: cyStatusPlaceholderSolidX24
|
|
82
87
|
},
|
|
83
88
|
cancelled: {
|
|
84
|
-
shouldSpin: false,
|
|
85
89
|
size4Icon: cyStatusCancelledSimpleX4,
|
|
86
90
|
size8Icon: cyStatusCancelledSimpleX8,
|
|
87
91
|
size12Icon: cyStatusCancelledSolidX12,
|
|
@@ -89,7 +93,6 @@ var statuses$2 = {
|
|
|
89
93
|
size24Icon: cyStatusCancelledOutlineX24
|
|
90
94
|
},
|
|
91
95
|
noTests: {
|
|
92
|
-
shouldSpin: false,
|
|
93
96
|
size4Icon: cyStatusCancelledSimpleX4,
|
|
94
97
|
size8Icon: cyStatusCancelledSimpleX8,
|
|
95
98
|
size12Icon: cyStatusCancelledSolidX12,
|
|
@@ -97,7 +100,6 @@ var statuses$2 = {
|
|
|
97
100
|
size24Icon: cyStatusCancelledOutlineX24
|
|
98
101
|
},
|
|
99
102
|
errored: {
|
|
100
|
-
shouldSpin: false,
|
|
101
103
|
size4Icon: cyStatusErroredSimpleX4,
|
|
102
104
|
size8Icon: cyStatusErroredSimpleX8,
|
|
103
105
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -105,7 +107,6 @@ var statuses$2 = {
|
|
|
105
107
|
size24Icon: cyStatusErroredOutlineX24
|
|
106
108
|
},
|
|
107
109
|
timedOut: {
|
|
108
|
-
shouldSpin: false,
|
|
109
110
|
size4Icon: cyStatusErroredSimpleX4,
|
|
110
111
|
size8Icon: cyStatusErroredSimpleX8,
|
|
111
112
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -113,7 +114,6 @@ var statuses$2 = {
|
|
|
113
114
|
size24Icon: cyStatusErroredOutlineX24
|
|
114
115
|
},
|
|
115
116
|
overLimit: {
|
|
116
|
-
shouldSpin: false,
|
|
117
117
|
size4Icon: cyStatusErroredSimpleX4,
|
|
118
118
|
size8Icon: cyStatusErroredSimpleX8,
|
|
119
119
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -121,7 +121,6 @@ var statuses$2 = {
|
|
|
121
121
|
size24Icon: cyStatusErroredOutlineX24
|
|
122
122
|
},
|
|
123
123
|
skipped: {
|
|
124
|
-
shouldSpin: false,
|
|
125
124
|
size4Icon: cyStatusSkippedSimpleX4,
|
|
126
125
|
size8Icon: cyStatusSkippedSimpleX8,
|
|
127
126
|
size12Icon: cyStatusSkippedOutlineX12,
|
|
@@ -129,7 +128,6 @@ var statuses$2 = {
|
|
|
129
128
|
size24Icon: cyStatusSkippedOutlineX24
|
|
130
129
|
},
|
|
131
130
|
pending: {
|
|
132
|
-
shouldSpin: false,
|
|
133
131
|
size4Icon: cyStatusPendingSimpleX4,
|
|
134
132
|
size8Icon: cyStatusPendingSimpleX8,
|
|
135
133
|
size12Icon: cyStatusPendingOutlineX12,
|
|
@@ -138,6 +136,96 @@ var statuses$2 = {
|
|
|
138
136
|
}
|
|
139
137
|
};
|
|
140
138
|
|
|
139
|
+
/**
|
|
140
|
+
* This "const" is used to create the list of statuses
|
|
141
|
+
*/
|
|
142
|
+
var constStatuses = {
|
|
143
|
+
running: {
|
|
144
|
+
// <windi-keep strokeColor="indigo-400" />
|
|
145
|
+
color: 'indigo-400',
|
|
146
|
+
use: 'Runs, specs, groups, test results',
|
|
147
|
+
variants: ['outline'],
|
|
148
|
+
// <windi-keep fillColor="gray-100" />
|
|
149
|
+
secondaryColor: 'gray-100',
|
|
150
|
+
shouldSpin: true
|
|
151
|
+
},
|
|
152
|
+
passed: {
|
|
153
|
+
// <windi-keep strokeColor="jade-400" />
|
|
154
|
+
color: 'jade-400',
|
|
155
|
+
use: 'Runs, specs, groups, test results',
|
|
156
|
+
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Passed',
|
|
157
|
+
variants: ['outline', 'simple', 'solid']
|
|
158
|
+
},
|
|
159
|
+
failed: {
|
|
160
|
+
// <windi-keep strokeColor="red-400" />
|
|
161
|
+
color: 'red-400',
|
|
162
|
+
use: 'Runs, specs, groups, test results',
|
|
163
|
+
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Failed',
|
|
164
|
+
variants: ['outline', 'simple', 'solid']
|
|
165
|
+
},
|
|
166
|
+
unclaimed: {
|
|
167
|
+
// <windi-keep strokeColor="gray-100" />
|
|
168
|
+
color: 'gray-100',
|
|
169
|
+
use: 'Specs',
|
|
170
|
+
variants: ['outline']
|
|
171
|
+
},
|
|
172
|
+
placeholder: {
|
|
173
|
+
// <windi-keep strokeColor="gray-300" />
|
|
174
|
+
color: 'gray-300',
|
|
175
|
+
use: 'Placeholder',
|
|
176
|
+
variants: ['solid']
|
|
177
|
+
},
|
|
178
|
+
cancelled: {
|
|
179
|
+
// <windi-keep strokeColor="gray-300" />
|
|
180
|
+
color: 'gray-300',
|
|
181
|
+
use: 'Runs, specs, groups, test results',
|
|
182
|
+
variants: ['outline', 'solid']
|
|
183
|
+
},
|
|
184
|
+
noTests: {
|
|
185
|
+
// <windi-keep strokeColor="gray-400" />
|
|
186
|
+
color: 'gray-400',
|
|
187
|
+
use: 'Runs, specs, groups',
|
|
188
|
+
variants: ['outline', 'solid']
|
|
189
|
+
},
|
|
190
|
+
errored: {
|
|
191
|
+
// <windi-keep strokeColor="orange-400" />
|
|
192
|
+
color: 'orange-400',
|
|
193
|
+
use: 'Runs, specs, groups, test results',
|
|
194
|
+
variants: ['outline', 'solid']
|
|
195
|
+
},
|
|
196
|
+
timedOut: {
|
|
197
|
+
// <windi-keep strokeColor="orange-400" />
|
|
198
|
+
color: 'orange-400',
|
|
199
|
+
use: 'Runs, specs, groups, test results',
|
|
200
|
+
variants: ['outline', 'solid']
|
|
201
|
+
},
|
|
202
|
+
overLimit: {
|
|
203
|
+
// <windi-keep strokeColor="orange-400" />
|
|
204
|
+
color: 'orange-400',
|
|
205
|
+
use: 'Runs, specs, groups',
|
|
206
|
+
link: 'https://docs.cypress.io/faq/questions/dashboard-faq#What-happens-once-I-reach-the-test-results-limit',
|
|
207
|
+
variants: ['outline', 'solid']
|
|
208
|
+
},
|
|
209
|
+
skipped: {
|
|
210
|
+
// <windi-keep strokeColor="gray-400" />
|
|
211
|
+
color: 'gray-400',
|
|
212
|
+
use: 'Test results',
|
|
213
|
+
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Skipped',
|
|
214
|
+
variants: ['outline']
|
|
215
|
+
},
|
|
216
|
+
pending: {
|
|
217
|
+
// <windi-keep strokeColor="gray-300" />
|
|
218
|
+
color: 'gray-300',
|
|
219
|
+
use: 'Test results',
|
|
220
|
+
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Pending',
|
|
221
|
+
variants: ['outline']
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* The status we have here, allow us to check the validity of the constant
|
|
226
|
+
*/
|
|
227
|
+
var statuses$2 = constStatuses;
|
|
228
|
+
|
|
141
229
|
/******************************************************************************
|
|
142
230
|
Copyright (c) Microsoft Corporation.
|
|
143
231
|
|
|
@@ -202,11 +290,19 @@ var compileReactIconProperties = function (_a) {
|
|
|
202
290
|
var compileProps = function (_a) {
|
|
203
291
|
var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size;
|
|
204
292
|
var statusInfo = status ? statuses[status] : statuses.placeholder;
|
|
205
|
-
var
|
|
206
|
-
var
|
|
293
|
+
var iconInfo = status ? statuses$2[status] : statuses$2.placeholder;
|
|
294
|
+
var _b = statusInfo["size" + size + "Icon"], iconData = _b.data, name = _b.name;
|
|
295
|
+
var classes = "inline-block " + (className || '') + " " + (iconInfo.shouldSpin && size !== '4' ? 'animate-spin' : '');
|
|
296
|
+
var compiledClasses = getComponentAttributes({
|
|
297
|
+
name: name,
|
|
298
|
+
strokeColor: iconInfo.color,
|
|
299
|
+
size: size,
|
|
300
|
+
availableSizes: [size],
|
|
301
|
+
fillColor: iconInfo.secondaryColor
|
|
302
|
+
}).compiledClasses;
|
|
207
303
|
return compileReactIconProperties({
|
|
208
|
-
body:
|
|
209
|
-
compiledClasses: [classes],
|
|
304
|
+
body: iconData,
|
|
305
|
+
compiledClasses: __spreadArray(__spreadArray([], compiledClasses, true), [classes], false),
|
|
210
306
|
size: size
|
|
211
307
|
});
|
|
212
308
|
};
|
|
@@ -215,7 +311,7 @@ var OutlineStatusIcon = function (_a) {
|
|
|
215
311
|
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"]);
|
|
216
312
|
return React.createElement('svg', compileProps({
|
|
217
313
|
status: status,
|
|
218
|
-
statuses: statuses$
|
|
314
|
+
statuses: statuses$3,
|
|
219
315
|
className: rest.className,
|
|
220
316
|
size: size
|
|
221
317
|
}));
|
|
@@ -223,7 +319,6 @@ var OutlineStatusIcon = function (_a) {
|
|
|
223
319
|
|
|
224
320
|
var statuses$1 = {
|
|
225
321
|
running: {
|
|
226
|
-
shouldSpin: true,
|
|
227
322
|
size4Icon: cyStatusRunningSimpleX4,
|
|
228
323
|
size8Icon: cyStatusRunningSimpleX8,
|
|
229
324
|
size12Icon: cyStatusRunningOutlineX12,
|
|
@@ -231,7 +326,6 @@ var statuses$1 = {
|
|
|
231
326
|
size24Icon: cyStatusRunningOutlineX24
|
|
232
327
|
},
|
|
233
328
|
passed: {
|
|
234
|
-
shouldSpin: false,
|
|
235
329
|
size4Icon: cyStatusPassedSimpleX4,
|
|
236
330
|
size8Icon: cyStatusPassedSimpleX8,
|
|
237
331
|
size12Icon: cyStatusPassedSimpleX12,
|
|
@@ -239,7 +333,6 @@ var statuses$1 = {
|
|
|
239
333
|
size24Icon: cyStatusPassedSimpleX24
|
|
240
334
|
},
|
|
241
335
|
failed: {
|
|
242
|
-
shouldSpin: false,
|
|
243
336
|
size4Icon: cyStatusFailedSimpleX4,
|
|
244
337
|
size8Icon: cyStatusFailedSimpleX8,
|
|
245
338
|
size12Icon: cyStatusFailedSimpleX12,
|
|
@@ -247,7 +340,6 @@ var statuses$1 = {
|
|
|
247
340
|
size24Icon: cyStatusFailedSimpleX24
|
|
248
341
|
},
|
|
249
342
|
unclaimed: {
|
|
250
|
-
shouldSpin: false,
|
|
251
343
|
size4Icon: cyStatusQueuedSimpleX4,
|
|
252
344
|
size8Icon: cyStatusQueuedSimpleX8,
|
|
253
345
|
size12Icon: cyStatusQueuedOutlineX12,
|
|
@@ -255,7 +347,6 @@ var statuses$1 = {
|
|
|
255
347
|
size24Icon: cyStatusQueuedOutlineX24
|
|
256
348
|
},
|
|
257
349
|
placeholder: {
|
|
258
|
-
shouldSpin: false,
|
|
259
350
|
size4Icon: cyStatusPlaceholderSimpleX4,
|
|
260
351
|
size8Icon: cyStatusPlaceholderSimpleX8,
|
|
261
352
|
size12Icon: cyStatusPlaceholderSolidX12,
|
|
@@ -263,7 +354,6 @@ var statuses$1 = {
|
|
|
263
354
|
size24Icon: cyStatusPlaceholderSolidX24
|
|
264
355
|
},
|
|
265
356
|
cancelled: {
|
|
266
|
-
shouldSpin: false,
|
|
267
357
|
size4Icon: cyStatusCancelledSimpleX4,
|
|
268
358
|
size8Icon: cyStatusCancelledSimpleX8,
|
|
269
359
|
size12Icon: cyStatusCancelledSolidX12,
|
|
@@ -271,7 +361,6 @@ var statuses$1 = {
|
|
|
271
361
|
size24Icon: cyStatusCancelledSolidX24
|
|
272
362
|
},
|
|
273
363
|
noTests: {
|
|
274
|
-
shouldSpin: false,
|
|
275
364
|
size4Icon: cyStatusCancelledSimpleX4,
|
|
276
365
|
size8Icon: cyStatusCancelledSimpleX8,
|
|
277
366
|
size12Icon: cyStatusCancelledSolidX12,
|
|
@@ -279,7 +368,6 @@ var statuses$1 = {
|
|
|
279
368
|
size24Icon: cyStatusCancelledSolidX24
|
|
280
369
|
},
|
|
281
370
|
errored: {
|
|
282
|
-
shouldSpin: false,
|
|
283
371
|
size4Icon: cyStatusErroredSimpleX4,
|
|
284
372
|
size8Icon: cyStatusErroredSimpleX8,
|
|
285
373
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -287,7 +375,6 @@ var statuses$1 = {
|
|
|
287
375
|
size24Icon: cyStatusErroredSolidX24
|
|
288
376
|
},
|
|
289
377
|
timedOut: {
|
|
290
|
-
shouldSpin: false,
|
|
291
378
|
size4Icon: cyStatusErroredSimpleX4,
|
|
292
379
|
size8Icon: cyStatusErroredSimpleX8,
|
|
293
380
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -295,7 +382,6 @@ var statuses$1 = {
|
|
|
295
382
|
size24Icon: cyStatusErroredSolidX24
|
|
296
383
|
},
|
|
297
384
|
overLimit: {
|
|
298
|
-
shouldSpin: false,
|
|
299
385
|
size4Icon: cyStatusErroredSimpleX4,
|
|
300
386
|
size8Icon: cyStatusErroredSimpleX8,
|
|
301
387
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -303,7 +389,6 @@ var statuses$1 = {
|
|
|
303
389
|
size24Icon: cyStatusErroredSolidX24
|
|
304
390
|
},
|
|
305
391
|
skipped: {
|
|
306
|
-
shouldSpin: false,
|
|
307
392
|
size4Icon: cyStatusSkippedSimpleX4,
|
|
308
393
|
size8Icon: cyStatusSkippedSimpleX8,
|
|
309
394
|
size12Icon: cyStatusSkippedOutlineX12,
|
|
@@ -311,7 +396,6 @@ var statuses$1 = {
|
|
|
311
396
|
size24Icon: cyStatusSkippedOutlineX24
|
|
312
397
|
},
|
|
313
398
|
pending: {
|
|
314
|
-
shouldSpin: false,
|
|
315
399
|
size4Icon: cyStatusPendingSimpleX4,
|
|
316
400
|
size8Icon: cyStatusPendingSimpleX8,
|
|
317
401
|
size12Icon: cyStatusPendingOutlineX12,
|
|
@@ -332,7 +416,6 @@ var SimpleStatusIcon = function (_a) {
|
|
|
332
416
|
|
|
333
417
|
var statuses = {
|
|
334
418
|
running: {
|
|
335
|
-
shouldSpin: true,
|
|
336
419
|
size4Icon: cyStatusRunningSimpleX4,
|
|
337
420
|
size8Icon: cyStatusRunningSimpleX8,
|
|
338
421
|
size12Icon: cyStatusRunningOutlineX12,
|
|
@@ -340,7 +423,6 @@ var statuses = {
|
|
|
340
423
|
size24Icon: cyStatusRunningOutlineX24
|
|
341
424
|
},
|
|
342
425
|
passed: {
|
|
343
|
-
shouldSpin: false,
|
|
344
426
|
size4Icon: cyStatusPassedSimpleX4,
|
|
345
427
|
size8Icon: cyStatusPassedSimpleX8,
|
|
346
428
|
size12Icon: cyStatusPassedSimpleX12,
|
|
@@ -348,7 +430,6 @@ var statuses = {
|
|
|
348
430
|
size24Icon: cyStatusPassedSolidX24
|
|
349
431
|
},
|
|
350
432
|
failed: {
|
|
351
|
-
shouldSpin: false,
|
|
352
433
|
size4Icon: cyStatusFailedSimpleX4,
|
|
353
434
|
size8Icon: cyStatusFailedSimpleX8,
|
|
354
435
|
size12Icon: cyStatusFailedSimpleX12,
|
|
@@ -356,7 +437,6 @@ var statuses = {
|
|
|
356
437
|
size24Icon: cyStatusFailedSolidX24
|
|
357
438
|
},
|
|
358
439
|
unclaimed: {
|
|
359
|
-
shouldSpin: false,
|
|
360
440
|
size4Icon: cyStatusQueuedSimpleX4,
|
|
361
441
|
size8Icon: cyStatusQueuedSimpleX8,
|
|
362
442
|
size12Icon: cyStatusQueuedOutlineX12,
|
|
@@ -364,7 +444,6 @@ var statuses = {
|
|
|
364
444
|
size24Icon: cyStatusQueuedOutlineX24
|
|
365
445
|
},
|
|
366
446
|
placeholder: {
|
|
367
|
-
shouldSpin: false,
|
|
368
447
|
size4Icon: cyStatusPlaceholderSimpleX4,
|
|
369
448
|
size8Icon: cyStatusPlaceholderSimpleX8,
|
|
370
449
|
size12Icon: cyStatusPlaceholderSolidX12,
|
|
@@ -372,7 +451,6 @@ var statuses = {
|
|
|
372
451
|
size24Icon: cyStatusPlaceholderSolidX24
|
|
373
452
|
},
|
|
374
453
|
cancelled: {
|
|
375
|
-
shouldSpin: false,
|
|
376
454
|
size4Icon: cyStatusCancelledSimpleX4,
|
|
377
455
|
size8Icon: cyStatusCancelledSimpleX8,
|
|
378
456
|
size12Icon: cyStatusCancelledSolidX12,
|
|
@@ -380,7 +458,6 @@ var statuses = {
|
|
|
380
458
|
size24Icon: cyStatusCancelledSolidX24
|
|
381
459
|
},
|
|
382
460
|
noTests: {
|
|
383
|
-
shouldSpin: false,
|
|
384
461
|
size4Icon: cyStatusCancelledSimpleX4,
|
|
385
462
|
size8Icon: cyStatusCancelledSimpleX8,
|
|
386
463
|
size12Icon: cyStatusCancelledSolidX12,
|
|
@@ -388,7 +465,6 @@ var statuses = {
|
|
|
388
465
|
size24Icon: cyStatusCancelledSolidX24
|
|
389
466
|
},
|
|
390
467
|
errored: {
|
|
391
|
-
shouldSpin: false,
|
|
392
468
|
size4Icon: cyStatusErroredSimpleX4,
|
|
393
469
|
size8Icon: cyStatusErroredSimpleX8,
|
|
394
470
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -396,7 +472,6 @@ var statuses = {
|
|
|
396
472
|
size24Icon: cyStatusErroredSolidX24
|
|
397
473
|
},
|
|
398
474
|
timedOut: {
|
|
399
|
-
shouldSpin: false,
|
|
400
475
|
size4Icon: cyStatusErroredSimpleX4,
|
|
401
476
|
size8Icon: cyStatusErroredSimpleX8,
|
|
402
477
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -404,7 +479,6 @@ var statuses = {
|
|
|
404
479
|
size24Icon: cyStatusErroredSolidX24
|
|
405
480
|
},
|
|
406
481
|
overLimit: {
|
|
407
|
-
shouldSpin: false,
|
|
408
482
|
size4Icon: cyStatusErroredSimpleX4,
|
|
409
483
|
size8Icon: cyStatusErroredSimpleX8,
|
|
410
484
|
size12Icon: cyStatusErroredSolidX12,
|
|
@@ -412,7 +486,6 @@ var statuses = {
|
|
|
412
486
|
size24Icon: cyStatusErroredSolidX24
|
|
413
487
|
},
|
|
414
488
|
skipped: {
|
|
415
|
-
shouldSpin: false,
|
|
416
489
|
size4Icon: cyStatusSkippedSimpleX4,
|
|
417
490
|
size8Icon: cyStatusSkippedSimpleX8,
|
|
418
491
|
size12Icon: cyStatusSkippedOutlineX12,
|
|
@@ -420,7 +493,6 @@ var statuses = {
|
|
|
420
493
|
size24Icon: cyStatusSkippedOutlineX24
|
|
421
494
|
},
|
|
422
495
|
pending: {
|
|
423
|
-
shouldSpin: false,
|
|
424
496
|
size4Icon: cyStatusPendingSimpleX4,
|
|
425
497
|
size8Icon: cyStatusPendingSimpleX8,
|
|
426
498
|
size12Icon: cyStatusPendingOutlineX12,
|
|
@@ -452,5 +524,5 @@ var StatusIcon = function (_a) {
|
|
|
452
524
|
|
|
453
525
|
export { OutlineStatusIcon, SimpleStatusIcon, SolidStatusIcon, StatusIcon as default };
|
|
454
526
|
|
|
455
|
-
/* <windicss-keep class="outline inline-block animate-spin"> */
|
|
527
|
+
/* <windicss-keep class="outline inline-block animate-spin icon-dark-indigo-400 icon-light-gray-100 icon-dark-jade-400 icon-dark-red-400 icon-dark-gray-100 icon-dark-gray-300 icon-dark-gray-400 icon-dark-orange-400"> */
|
|
456
528
|
//# sourceMappingURL=index.es.mjs.map
|