@workday/canvas-kit-docs 8.0.0-alpha.121-next.2 → 8.0.0-alpha.123-next.3
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,80 @@
|
|
|
1
|
+
# Canvas Kit 7.0 Upgrade Guide
|
|
2
|
+
|
|
3
|
+
This guide contains breaking changes in Canvas Kit v7. Please
|
|
4
|
+
[reach out](https://github.com/Workday/canvas-kit/issues/new?labels=bug&template=bug.md) if you have
|
|
5
|
+
any questions.
|
|
6
|
+
|
|
7
|
+
- [Codemod](#codemod)
|
|
8
|
+
- [General Changes](#general-changes) -[Remove Default Imports](#remove-default-imports)
|
|
9
|
+
|
|
10
|
+
## Codemod
|
|
11
|
+
|
|
12
|
+
Please use our [codemod package](https://github.com/Workday/canvas-kit/tree/master/modules/codemod)
|
|
13
|
+
to automatically update your code to work with many of the breaking changes as you upgrade from
|
|
14
|
+
Canvas Kit v6 to v7:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
> npx @workday/canvas-kit-codemod v7 [path]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> Note: This codemod only works on `.js`, `.jsx`, `.ts`, and `.tsx` extensions. You may need to make
|
|
21
|
+
> some manual changes in other file types (`.json`, `.mdx`, `.md`, etc.).
|
|
22
|
+
|
|
23
|
+
> Note: You may need to run your linter after executing the codemod, as its resulting formatting
|
|
24
|
+
> (spacing, quotes, etc.) may not match your project's styling.
|
|
25
|
+
|
|
26
|
+
**Breaking changes handled by this codemod will be marked with a 🤖.**
|
|
27
|
+
|
|
28
|
+
**Please verify all changes made by the codemod. As a safety precaution, we recommend committing the
|
|
29
|
+
changes from the codemod as a single isolated commit (separate from other changes) so you can
|
|
30
|
+
rollback more easily if necessary.**
|
|
31
|
+
|
|
32
|
+
[Let us know](https://github.com/Workday/canvas-kit/issues/new?labels=bug&template=bug.md) if you
|
|
33
|
+
encounter any issues or use cases that we've missed.
|
|
34
|
+
|
|
35
|
+
## General Changes
|
|
36
|
+
|
|
37
|
+
### Remove Default Imports
|
|
38
|
+
|
|
39
|
+
As part of some cleanup, we've removed any default imports that where lingering. This change matches
|
|
40
|
+
more closely what we've been doing with new components and systems. As part of this change, the
|
|
41
|
+
components listed below have moved from default imports to named imports.
|
|
42
|
+
|
|
43
|
+
##### Fonts
|
|
44
|
+
|
|
45
|
+
- fonts
|
|
46
|
+
|
|
47
|
+
##### Main Package Components
|
|
48
|
+
|
|
49
|
+
- Toast
|
|
50
|
+
- Canvas
|
|
51
|
+
- Tooltip
|
|
52
|
+
- TextArea
|
|
53
|
+
- Avatar
|
|
54
|
+
- CountBadge
|
|
55
|
+
- Checkbox
|
|
56
|
+
- FormField
|
|
57
|
+
- LoadingDots
|
|
58
|
+
- Radio
|
|
59
|
+
- SegmentedControl
|
|
60
|
+
- Select
|
|
61
|
+
- SidePanel
|
|
62
|
+
- StatusIndicator
|
|
63
|
+
- Switch
|
|
64
|
+
- Table
|
|
65
|
+
- TextInput
|
|
66
|
+
|
|
67
|
+
##### Labs Components
|
|
68
|
+
|
|
69
|
+
- Combobox
|
|
70
|
+
- Drawer
|
|
71
|
+
|
|
72
|
+
##### Preview Components
|
|
73
|
+
|
|
74
|
+
- Breadcrumbs
|
|
75
|
+
- ColorPicker
|
|
76
|
+
- Menu
|
|
77
|
+
- Select
|
|
78
|
+
- SidePanel
|
|
79
|
+
|
|
80
|
+
🤖 The codemod will update imports to be named imports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Specifications} from '@workday/canvas-kit-docs';
|
|
2
2
|
|
|
3
|
-
import Checkbox from '@workday/canvas-kit-react/checkbox/lib/Checkbox.tsx';
|
|
3
|
+
import {Checkbox} from '@workday/canvas-kit-react/checkbox/lib/Checkbox.tsx';
|
|
4
4
|
|
|
5
5
|
import Alert from './examples/Alert';
|
|
6
6
|
import Basic from './examples/Basic';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Specifications} from '@workday/canvas-kit-docs';
|
|
2
2
|
|
|
3
|
-
import FormField from '@workday/canvas-kit-react/form-field';
|
|
3
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
4
4
|
|
|
5
5
|
import Alert from './examples/Alert.tsx';
|
|
6
6
|
import AlertLabel from './examples/AlertLabel.tsx';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
|
|
3
3
|
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import FormField from '@workday/canvas-kit-react/form-field';
|
|
5
|
-
import TextInput from '@workday/canvas-kit-react/text-input';
|
|
4
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
5
|
+
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
6
6
|
import {HStack, Box} from '@workday/canvas-kit-react/layout';
|
|
7
7
|
|
|
8
8
|
export default () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.123-next.3+e2414dde",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@storybook/csf": "0.0.1",
|
|
45
|
-
"@workday/canvas-kit-react": "^8.0.0-alpha.
|
|
45
|
+
"@workday/canvas-kit-react": "^8.0.0-alpha.123-next.3+e2414dde"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"fs-extra": "^10.0.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"mkdirp": "^1.0.3",
|
|
51
51
|
"typescript": "4.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "e2414dde8f4b7825d294a81ed61472745b34e390"
|
|
54
54
|
}
|