@workday/canvas-kit-docs 9.1.19 → 9.1.22
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/dist/es6/docgen/docParser.d.ts +3 -2
- package/dist/es6/docgen/docParser.d.ts.map +1 -1
- package/dist/es6/docgen/docParser.js +73 -62
- package/dist/es6/docgen/plugins/componentParser.d.ts.map +1 -1
- package/dist/es6/docgen/plugins/componentParser.js +4 -2
- package/dist/es6/docgen/plugins/enhancedComponentParser.js +5 -5
- package/dist/es6/docgen/plugins/modelParser.js +3 -3
- package/dist/es6/lib/docs.js +570 -2713
- package/dist/es6/lib/widgetUtils.js +1 -1
- package/dist/mdx/MAINTAINING.mdx +83 -4
- package/lib/widgetUtils.tsx +1 -1
- package/package.json +5 -5
|
@@ -113,7 +113,7 @@ export const SymbolDialog = ({ value }) => {
|
|
|
113
113
|
" "),
|
|
114
114
|
breadcrumbsList.length > 1 && (React.createElement(Breadcrumbs, { "aria-label": "Breadcrumbs" },
|
|
115
115
|
React.createElement(Breadcrumbs.List, { paddingX: "xxs" }, breadcrumbsList.map((item, index) => {
|
|
116
|
-
return (React.createElement(React.Fragment, null,
|
|
116
|
+
return (React.createElement(React.Fragment, null, index === breadcrumbsList.length - 1 ? (React.createElement(Breadcrumbs.CurrentItem, { key: index }, item)) : (React.createElement(Breadcrumbs.Item, { key: index },
|
|
117
117
|
React.createElement(Breadcrumbs.Link, { onClick: e => handleBreadcrumbClick(e, index), href: '#' }, item)))));
|
|
118
118
|
})))),
|
|
119
119
|
React.createElement(Dialog.Body, null,
|
package/dist/mdx/MAINTAINING.mdx
CHANGED
|
@@ -27,6 +27,7 @@ Kit!
|
|
|
27
27
|
- [Canary Releases](#canary-releases)
|
|
28
28
|
- [Codemods](#codemods)
|
|
29
29
|
- [Add a New Codemod](#add-a-new-codemod)
|
|
30
|
+
- [Deprecations](#deprecations)
|
|
30
31
|
|
|
31
32
|
## Branches
|
|
32
33
|
|
|
@@ -270,12 +271,13 @@ last release tag. So for example, a V8 canary would look something like this:
|
|
|
270
271
|
## Codemods
|
|
271
272
|
|
|
272
273
|
We use codemods to reduce friction for consumers as they make changes and do upgrades. Codemods are
|
|
273
|
-
accompany major version releases since v5, and can also be released in minor releases if users want
|
|
274
|
+
accompany major version releases since v5, and can also be released in minor releases if users want
|
|
275
|
+
to apply some changes sooner.
|
|
274
276
|
|
|
275
277
|
### Add a New Codemod
|
|
276
278
|
|
|
277
|
-
Adding a new codemod is pretty straightforward, but this guide will make sure you don't miss any
|
|
278
|
-
along the way.
|
|
279
|
+
Adding a new codemod is pretty straightforward, but this guide will make sure you don't miss any
|
|
280
|
+
steps along the way.
|
|
279
281
|
|
|
280
282
|
First, you need to add a new command to the root CLI. For this example, we'll pretend you're adding
|
|
281
283
|
a new v10 codemod.
|
|
@@ -379,4 +381,81 @@ describe('Example Codemod', () => {
|
|
|
379
381
|
});
|
|
380
382
|
```
|
|
381
383
|
|
|
382
|
-
And that's it! You're done. Stage your changes, commit, and push up a PR.
|
|
384
|
+
And that's it! You're done. Stage your changes, commit, and push up a PR.
|
|
385
|
+
|
|
386
|
+
## Deprecations
|
|
387
|
+
|
|
388
|
+
We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) JSDoc tag to code we plan to remove
|
|
389
|
+
in a future major release. This signals consumers to migrate to a more stable alternative before the
|
|
390
|
+
deprecated code is removed.
|
|
391
|
+
|
|
392
|
+
Add the `@deprecated` tag to the JSDoc comment directly above all exported declarations you wish to
|
|
393
|
+
deprecate. Create a new JSDoc comment if one doesn't already exist.
|
|
394
|
+
|
|
395
|
+
```tsx
|
|
396
|
+
/**
|
|
397
|
+
* ...existing JSDoc comment, if present...
|
|
398
|
+
*
|
|
399
|
+
* @deprecated ⚠️ ${Deprecated Name} has been deprecated and will be removed in a future major release. ${Provide a migration strategy}
|
|
400
|
+
*/
|
|
401
|
+
export...
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
The provided migration strategy can take on any form as long as it gives the consumer a path forward
|
|
405
|
+
once the deprecated code is removed.
|
|
406
|
+
|
|
407
|
+
For example, we'll deprecate a component in our Main package before replacing it with an updated
|
|
408
|
+
version of the component in our Preview or Labs packages. Note the inclusion of package names
|
|
409
|
+
(Main/Preview/Labs) for disambiguation as well as the optional Storybook link to the updated
|
|
410
|
+
component.
|
|
411
|
+
|
|
412
|
+
```tsx
|
|
413
|
+
/**
|
|
414
|
+
* @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead.
|
|
415
|
+
*/
|
|
416
|
+
export class StatusIndicator...
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Here's an example of a deprecated utility function.
|
|
420
|
+
|
|
421
|
+
```tsx
|
|
422
|
+
/**
|
|
423
|
+
* @deprecated ⚠️ `subModelHook` has been deprecated and will be removed in a future major release. Please use `createSubModelElemPropsHook` instead.
|
|
424
|
+
*/
|
|
425
|
+
export const subModelHook...
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
You may share the same `@deprecation` note for multiple deprecations related to the same component.
|
|
429
|
+
|
|
430
|
+
```tsx
|
|
431
|
+
/**
|
|
432
|
+
* @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead.
|
|
433
|
+
*/
|
|
434
|
+
export enum StatusIndicatorType...
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead.
|
|
438
|
+
*/
|
|
439
|
+
export interface StatusIndicatorProps...
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* @deprecated ⚠️ Status Indicator in Main has been deprecated and will be removed in a future major release. Please use [Status Indicator in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) instead.
|
|
443
|
+
*/
|
|
444
|
+
export class StatusIndicator...
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Finally, be sure to notify users of the deprecation in the corresponding
|
|
448
|
+
[Upgrade Guide](https://github.com/Workday/canvas-kit/tree/master/modules/docs/mdx) MDX.
|
|
449
|
+
|
|
450
|
+
```md
|
|
451
|
+
## Deprecations
|
|
452
|
+
|
|
453
|
+
...
|
|
454
|
+
|
|
455
|
+
### ${Deprecated Name}
|
|
456
|
+
|
|
457
|
+
**PR:** [#${PR number where the deprecation took place}](https://github.com/Workday/canvas-kit/pull/${PR number})
|
|
458
|
+
|
|
459
|
+
We've deprecated ${Deprecated Name} ${Optional: Include package name to disambiguate (e.g., "from Labs")} ${Provide a
|
|
460
|
+
migration strategy}
|
|
461
|
+
```
|
package/lib/widgetUtils.tsx
CHANGED
|
@@ -173,7 +173,7 @@ export const SymbolDialog = ({value}: SymbolDialogProps) => {
|
|
|
173
173
|
{breadcrumbsList.map((item, index) => {
|
|
174
174
|
return (
|
|
175
175
|
<>
|
|
176
|
-
{
|
|
176
|
+
{index === breadcrumbsList.length - 1 ? (
|
|
177
177
|
<Breadcrumbs.CurrentItem key={index}>{item}</Breadcrumbs.CurrentItem>
|
|
178
178
|
) : (
|
|
179
179
|
<Breadcrumbs.Item key={index}>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.22",
|
|
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,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^9.1.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^9.1.
|
|
49
|
-
"@workday/canvas-kit-react": "^9.1.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^9.1.22",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^9.1.22",
|
|
49
|
+
"@workday/canvas-kit-react": "^9.1.22",
|
|
50
50
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
51
51
|
"markdown-to-jsx": "^6.10.3",
|
|
52
52
|
"ts-node": "^10.9.1"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"mkdirp": "^1.0.3",
|
|
58
58
|
"typescript": "4.2"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "b00fd1c6dd6d3c2653d4ec7e518df12427557562"
|
|
61
61
|
}
|