@workday/canvas-kit-docs 10.3.9 → 10.3.11
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionsTable.d.ts","sourceRoot":"","sources":["../../../mdx/versionsTable.tsx"],"names":[],"mappings":"AA6DA,eAAO,MAAM,YAAY,mBAgCxB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Table, StatusIndicator } from '@workday/canvas-kit-preview-react';
|
|
3
|
+
// @ts-ignore: Cannot find module error
|
|
4
|
+
import { version } from '../../../lerna.json';
|
|
5
|
+
// When we release a new version, add the support version before the first item.
|
|
6
|
+
const allVersions = [
|
|
7
|
+
{
|
|
8
|
+
versionNumber: version,
|
|
9
|
+
documentation: 'https://github.com/Workday/canvas-kit',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
versionNumber: 9,
|
|
13
|
+
documentation: 'https://d2krrudi3mmzzw.cloudfront.net/v9/?path=/docs/welcome--page',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
versionNumber: 8,
|
|
17
|
+
documentation: 'https://d2krrudi3mmzzw.cloudfront.net/v8/?path=/docs/welcome--page',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
versionNumber: 7,
|
|
21
|
+
documentation: 'https://d2krrudi3mmzzw.cloudfront.net/v7/?path=/story/welcome-getting-started--page',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
versionNumber: 6,
|
|
25
|
+
documentation: 'https://d2krrudi3mmzzw.cloudfront.net/v7/?path=/story/welcome-getting-started--page',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
const statusIndicators = {
|
|
29
|
+
stable: {
|
|
30
|
+
variant: 'blue',
|
|
31
|
+
label: 'Stable',
|
|
32
|
+
},
|
|
33
|
+
support: {
|
|
34
|
+
variant: 'green',
|
|
35
|
+
label: 'Support',
|
|
36
|
+
},
|
|
37
|
+
deprecated: {
|
|
38
|
+
variant: 'red',
|
|
39
|
+
label: 'No Longer Supported',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
function getVersionStatusIndicator(versionNumber) {
|
|
43
|
+
// version from lerna is a string, so we need to do modify into a number
|
|
44
|
+
const currentMajorVersion = Number(version.split('.')[0]);
|
|
45
|
+
const modifiedVersionNumber = typeof versionNumber === 'string' ? Number(versionNumber.split('.')[0]) : versionNumber;
|
|
46
|
+
// if this is the current version
|
|
47
|
+
if (modifiedVersionNumber === currentMajorVersion) {
|
|
48
|
+
return statusIndicators.stable;
|
|
49
|
+
}
|
|
50
|
+
else if (modifiedVersionNumber === currentMajorVersion - 1) {
|
|
51
|
+
return statusIndicators.support;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return statusIndicators.deprecated;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export const VersionTable = () => {
|
|
58
|
+
return (React.createElement(Table, null,
|
|
59
|
+
React.createElement(Table.Head, null,
|
|
60
|
+
React.createElement(Table.Row, null,
|
|
61
|
+
React.createElement(Table.Header, { scope: "col" }, "Version"),
|
|
62
|
+
React.createElement(Table.Header, { scope: "col" }, "Documentation"),
|
|
63
|
+
React.createElement(Table.Header, { scope: "col" }, "Status"))),
|
|
64
|
+
React.createElement(Table.Body, null, allVersions.map(item => {
|
|
65
|
+
const { label, variant } = getVersionStatusIndicator(item.versionNumber);
|
|
66
|
+
return (React.createElement(Table.Row, null,
|
|
67
|
+
React.createElement(Table.Cell, null,
|
|
68
|
+
"v",
|
|
69
|
+
item.versionNumber),
|
|
70
|
+
React.createElement(Table.Cell, null,
|
|
71
|
+
React.createElement("a", { href: item.documentation, target: "_blank", rel: "noreferrer" }, "Documentation")),
|
|
72
|
+
React.createElement(Table.Cell, null,
|
|
73
|
+
React.createElement(StatusIndicator, { variant: variant },
|
|
74
|
+
React.createElement(StatusIndicator.Label, null, label)))));
|
|
75
|
+
}))));
|
|
76
|
+
};
|
|
@@ -125,7 +125,7 @@ export default () => {
|
|
|
125
125
|
</Heading>
|
|
126
126
|
<Table aria-labelledby={headingID}>
|
|
127
127
|
<Table.Row gridTemplateColumns="3.5rem repeat(2, 1fr)">
|
|
128
|
-
<Table.
|
|
128
|
+
<Table.Cell cs={tableHeaderStyles}>
|
|
129
129
|
<Tooltip title="Select All">
|
|
130
130
|
<Checkbox
|
|
131
131
|
checked={selectAllState === 'checked'}
|
|
@@ -133,7 +133,7 @@ export default () => {
|
|
|
133
133
|
onChange={handleSelectAll}
|
|
134
134
|
/>
|
|
135
135
|
</Tooltip>
|
|
136
|
-
</Table.
|
|
136
|
+
</Table.Cell>
|
|
137
137
|
<Table.Header scope="col" cs={tableHeaderStyles}>
|
|
138
138
|
Toppings
|
|
139
139
|
</Table.Header>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.11",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^10.3.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^10.3.
|
|
49
|
-
"@workday/canvas-kit-react": "^10.3.
|
|
50
|
-
"@workday/canvas-kit-styling": "^10.3.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^10.3.11",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^10.3.11",
|
|
49
|
+
"@workday/canvas-kit-react": "^10.3.11",
|
|
50
|
+
"@workday/canvas-kit-styling": "^10.3.11",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^1.0.0",
|
|
53
53
|
"markdown-to-jsx": "^6.10.3",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"mkdirp": "^1.0.3",
|
|
60
60
|
"typescript": "4.2"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "b654828e983d85818aeced1a58fabfb1efd5e70b"
|
|
63
63
|
}
|