@cypress-design/react-statusicon 0.2.5 → 0.3.0
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 +12 -0
- package/CHANGELOG.md +19 -0
- package/StatusIcon.tsx +3 -3
- package/StatusIconReact.cy.tsx +1 -1
- package/dist/constants.d.ts +7 -7
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.es.mjs +63 -62
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +67 -67
- package/dist/index.umd.js.map +1 -1
- package/dist/react/StatusIcon.d.ts +1 -1
- package/dist/react/StatusIcon.d.ts.map +1 -1
- package/dist/react/{OutlineStatusIcon.d.ts → _OutlineStatusIcon.d.ts} +1 -1
- package/dist/react/_OutlineStatusIcon.d.ts.map +1 -0
- package/dist/react/{SimpleStatusIcon.d.ts → _SimpleStatusIcon.d.ts} +1 -1
- package/dist/react/_SimpleStatusIcon.d.ts.map +1 -0
- package/dist/react/{SolidStatusIcon.d.ts → _SolidStatusIcon.d.ts} +1 -1
- package/dist/react/_SolidStatusIcon.d.ts.map +1 -0
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.d.ts.map +1 -1
- package/index.ts +3 -3
- package/package.json +6 -3
- package/tsconfig.json +3 -0
- package/StatusIcon.stories.mdx +0 -134
- package/dist/react/OutlineStatusIcon.d.ts.map +0 -1
- package/dist/react/SimpleStatusIcon.d.ts.map +0 -1
- package/dist/react/SolidStatusIcon.d.ts.map +0 -1
- /package/{OutlineStatusIcon.ts → _OutlineStatusIcon.ts} +0 -0
- /package/{SimpleStatusIcon.ts → _SimpleStatusIcon.ts} +0 -0
- /package/{SolidStatusIcon.ts → _SolidStatusIcon.ts} +0 -0
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SVGProps } from 'react';
|
|
3
3
|
import type { Variant, Size } from '../constants';
|
|
4
4
|
import { statuses } from '../constants';
|
|
5
|
-
export
|
|
5
|
+
export type StatusIconProps = {
|
|
6
6
|
/**
|
|
7
7
|
* The size of the icon's canvas, in pixels.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../StatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAKvC,
|
|
1
|
+
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../StatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAKvC,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;IACX;;MAEE;IACF,MAAM,CAAC,EAAE,MAAM,OAAO,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAA;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAC/B,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,CAW1C,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -3,4 +3,4 @@ import { SVGProps } from 'react';
|
|
|
3
3
|
import type { VariantStatusIconProps } from '../constants';
|
|
4
4
|
export declare const OutlineStatusIcon: React.FC<VariantStatusIconProps & SVGProps<SVGSVGElement>>;
|
|
5
5
|
export default OutlineStatusIcon;
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=_OutlineStatusIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_OutlineStatusIcon.d.ts","sourceRoot":"","sources":["../../_OutlineStatusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CACtC,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWjD,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -3,4 +3,4 @@ import { SVGProps } from 'react';
|
|
|
3
3
|
import type { VariantStatusIconProps } from '../constants';
|
|
4
4
|
export declare const SimpleStatusIcon: React.FC<VariantStatusIconProps & SVGProps<SVGSVGElement>>;
|
|
5
5
|
export default SimpleStatusIcon;
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=_SimpleStatusIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_SimpleStatusIcon.d.ts","sourceRoot":"","sources":["../../_SimpleStatusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CACrC,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWjD,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -3,4 +3,4 @@ import { SVGProps } from 'react';
|
|
|
3
3
|
import type { VariantStatusIconProps } from '../constants';
|
|
4
4
|
export declare const SolidStatusIcon: React.FC<VariantStatusIconProps & SVGProps<SVGSVGElement>>;
|
|
5
5
|
export default SolidStatusIcon;
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=_SolidStatusIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_SolidStatusIcon.d.ts","sourceRoot":"","sources":["../../_SolidStatusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CACpC,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWjD,CAAA;AAED,eAAe,eAAe,CAAA"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default } from './StatusIcon';
|
|
2
|
-
export { OutlineStatusIcon } from './
|
|
3
|
-
export { SimpleStatusIcon } from './
|
|
4
|
-
export { SolidStatusIcon } from './
|
|
2
|
+
export { OutlineStatusIcon } from './_OutlineStatusIcon';
|
|
3
|
+
export { SimpleStatusIcon } from './_SimpleStatusIcon';
|
|
4
|
+
export { SolidStatusIcon } from './_SolidStatusIcon';
|
|
5
5
|
export type { statusTypes as StatusType } from '../constants';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,YAAY,EAAE,WAAW,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default } from './StatusIcon'
|
|
2
|
-
export { OutlineStatusIcon } from './
|
|
3
|
-
export { SimpleStatusIcon } from './
|
|
4
|
-
export { SolidStatusIcon } from './
|
|
2
|
+
export { OutlineStatusIcon } from './_OutlineStatusIcon'
|
|
3
|
+
export { SimpleStatusIcon } from './_SimpleStatusIcon'
|
|
4
|
+
export { SolidStatusIcon } from './_SolidStatusIcon'
|
|
5
5
|
export type { statusTypes as StatusType } from '../constants'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress-design/react-statusicon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"*"
|
|
6
6
|
],
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
"build:types": "tsc --project ./tsconfig.build.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@cypress-design/icon-registry": "^0.
|
|
23
|
-
"@cypress-design/react-icon": "^0.
|
|
22
|
+
"@cypress-design/icon-registry": "^0.21.0",
|
|
23
|
+
"@cypress-design/react-icon": "^0.19.0",
|
|
24
24
|
"clsx": "*"
|
|
25
25
|
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@cypress-design/css": "*"
|
|
28
|
+
},
|
|
26
29
|
"license": "MIT"
|
|
27
30
|
}
|
package/tsconfig.json
CHANGED
package/StatusIcon.stories.mdx
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { ArgsTable, Canvas, Meta, Story, Description } from '@storybook/addon-docs'
|
|
2
|
-
import { version } from "./package.json"
|
|
3
|
-
import changelog from "./CHANGELOG.md"
|
|
4
|
-
import StatusIconStory from './StatusIcon.rootstory'
|
|
5
|
-
import { statuses } from '../constants'
|
|
6
|
-
|
|
7
|
-
import StatusIcon from './StatusIcon'
|
|
8
|
-
import { OutlineStatusIcon, SimpleStatusIcon, SolidStatusIcon } from '@cypress-design/react-statusicon'
|
|
9
|
-
|
|
10
|
-
<h1>StatusIcon<span className="text-lg font-normal"> - v{version}</span></h1>
|
|
11
|
-
|
|
12
|
-
There is <a href="https://on.cypress.io/writing-and-organizing-tests" target="_blank">info in the docs</a> about what these statuses mean. The terminology can be a bit confusing, particularly around <a href="https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Pending" target="_blank">pending</a> and <a href="https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Skipped" target="_blank">skipped</a> test results.
|
|
13
|
-
|
|
14
|
-
Runs, specs, and groups have one and only one of the following status: RUNNING, ERRORED, FAILED, TIMEDOUT, NOTESTS, PASSED, OVERLIMIT, or CANCELLED
|
|
15
|
-
|
|
16
|
-
Specs can also have status UNCLAIMED
|
|
17
|
-
|
|
18
|
-
Test results have one and only one of the following statuses: RUNNING, PENDING, SKIPPED, FAILED, PASSED, TIMEDOUT, ERRORED, or CANCELLED
|
|
19
|
-
|
|
20
|
-
<Meta
|
|
21
|
-
title="StatusIcon"
|
|
22
|
-
component={StatusIcon}
|
|
23
|
-
parameters={{
|
|
24
|
-
design: {
|
|
25
|
-
type: "figma",
|
|
26
|
-
url: "https://www.figma.com/file/1WJ3GVQyMV5e7xVxPg3yID/Design-System?node-id=6814%3A10841",
|
|
27
|
-
}
|
|
28
|
-
}}
|
|
29
|
-
argTypes={{
|
|
30
|
-
size: {
|
|
31
|
-
control: { type: 'select' },
|
|
32
|
-
defaultValue: '16'
|
|
33
|
-
},
|
|
34
|
-
status: {
|
|
35
|
-
control: { type: 'select' },
|
|
36
|
-
options: Object.keys(statuses),
|
|
37
|
-
defaultValue: 'failed'
|
|
38
|
-
},
|
|
39
|
-
variant: {
|
|
40
|
-
control: { type: 'select' },
|
|
41
|
-
defaultValue: 'simple'
|
|
42
|
-
},
|
|
43
|
-
}} />
|
|
44
|
-
|
|
45
|
-
<Canvas withSource="none">
|
|
46
|
-
<Story name="StatusIcon">
|
|
47
|
-
<StatusIconStory />
|
|
48
|
-
</Story>
|
|
49
|
-
</Canvas>
|
|
50
|
-
|
|
51
|
-
## Basic use
|
|
52
|
-
|
|
53
|
-
```jsx
|
|
54
|
-
import StatusIcon from '@cypress-design/react-statusicon'
|
|
55
|
-
|
|
56
|
-
<StatusIcon status="failed" size="16" variant="simple" />
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
<Canvas>
|
|
60
|
-
<Story name="Basic use">
|
|
61
|
-
{(args) => {
|
|
62
|
-
return (
|
|
63
|
-
<StatusIcon
|
|
64
|
-
status={args.status}
|
|
65
|
-
size={args.size}
|
|
66
|
-
variant={args.variant}
|
|
67
|
-
/>
|
|
68
|
-
)
|
|
69
|
-
}}
|
|
70
|
-
</Story>
|
|
71
|
-
</Canvas>
|
|
72
|
-
|
|
73
|
-
Not all statuses have unique icons for each variant. But if you pass any variant of the icon, it will default to one that is available for that status.
|
|
74
|
-
|
|
75
|
-
As an example, if you pass `variant="simple"` with `status="errored"`, it will default to the solid variant, since the errored status has no simple variant available.
|
|
76
|
-
|
|
77
|
-
<Canvas>
|
|
78
|
-
<StatusIcon
|
|
79
|
-
status="errored"
|
|
80
|
-
size="16"
|
|
81
|
-
variant="simple"
|
|
82
|
-
/>
|
|
83
|
-
</Canvas>
|
|
84
|
-
|
|
85
|
-
## Tree-shakable
|
|
86
|
-
|
|
87
|
-
If you want to avoid loading all the icon variants, you may use each variant separately.
|
|
88
|
-
|
|
89
|
-
```jsx
|
|
90
|
-
import { OutlineStatusIcon } from '@cypress-design/react-statusicon'
|
|
91
|
-
|
|
92
|
-
<OutlineStatusIcon status="failed" size="16" />
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
<Canvas>
|
|
96
|
-
<Story name="Tree-shakable">
|
|
97
|
-
<OutlineStatusIcon
|
|
98
|
-
status="failed"
|
|
99
|
-
size="16"
|
|
100
|
-
/>
|
|
101
|
-
<SimpleStatusIcon
|
|
102
|
-
status="failed"
|
|
103
|
-
size="16"
|
|
104
|
-
/>
|
|
105
|
-
<SolidStatusIcon
|
|
106
|
-
status="failed"
|
|
107
|
-
size="16"
|
|
108
|
-
/>
|
|
109
|
-
</Story>
|
|
110
|
-
</Canvas>
|
|
111
|
-
|
|
112
|
-
## Placeholder
|
|
113
|
-
|
|
114
|
-
The placeholder icon appears if you pass a falsy status or no status at all.
|
|
115
|
-
|
|
116
|
-
<Canvas>
|
|
117
|
-
<Story name="Placeholder">
|
|
118
|
-
<StatusIcon
|
|
119
|
-
status={null}
|
|
120
|
-
size="16"
|
|
121
|
-
variant="simple"
|
|
122
|
-
/>
|
|
123
|
-
<StatusIcon
|
|
124
|
-
size="16"
|
|
125
|
-
variant="simple"
|
|
126
|
-
/>
|
|
127
|
-
</Story>
|
|
128
|
-
</Canvas>
|
|
129
|
-
|
|
130
|
-
<ArgsTable />
|
|
131
|
-
|
|
132
|
-
<Description>
|
|
133
|
-
{changelog.replace(/^# .+/, '## Changelog')}
|
|
134
|
-
</Description>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OutlineStatusIcon.d.ts","sourceRoot":"","sources":["../../OutlineStatusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CACtC,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWjD,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStatusIcon.d.ts","sourceRoot":"","sources":["../../SimpleStatusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CACrC,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWjD,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidStatusIcon.d.ts","sourceRoot":"","sources":["../../SolidStatusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAG1D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CACpC,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWjD,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|