@workday/canvas-kit-docs 13.0.0-alpha.1007-next.0 → 13.0.0-alpha.1009-next.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/dist/es6/lib/StylePropsTable.js +1 -1
- package/dist/es6/lib/docs.js +4032 -622
- package/dist/es6/lib/widgets/external.js +1 -1
- package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
- package/dist/es6/mdx/welcomePage.js +1 -1
- package/dist/mdx/13.0-UPGRADE-GUIDE.mdx +41 -0
- package/dist/mdx/react/button/button/examples/ExternalHyperlink.tsx +3 -1
- package/dist/mdx/react/button/button/examples/ExternalHyperlinkInverse.tsx +5 -1
- package/lib/StylePropsTable.tsx +1 -1
- package/lib/widgets/external.tsx +3 -1
- package/package.json +6 -6
|
@@ -3,5 +3,5 @@ import { ExternalHyperlink } from '@workday/canvas-kit-react/button';
|
|
|
3
3
|
import { renderTypeParameters } from '../widgetUtils';
|
|
4
4
|
import { registerWidget } from '../Value';
|
|
5
5
|
registerWidget('external', ({ value }) => (React.createElement(React.Fragment, null,
|
|
6
|
-
React.createElement(ExternalHyperlink, { href: value.url }, value.name),
|
|
6
|
+
React.createElement(ExternalHyperlink, { href: value.url, iconLabel: "Open link in new window" }, value.name),
|
|
7
7
|
renderTypeParameters(value.typeParameters))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"welcomePage.d.ts","sourceRoot":"","sources":["../../../mdx/welcomePage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"welcomePage.d.ts","sourceRoot":"","sources":["../../../mdx/welcomePage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,eAAO,MAAM,WAAW,yBA6IvB,CAAC"}
|
|
@@ -26,7 +26,7 @@ export const WelcomePage = () => {
|
|
|
26
26
|
' ',
|
|
27
27
|
"This project provides a set of components for the Workday Canvas Design System that can be used to implement user experiences consistent with",
|
|
28
28
|
' ',
|
|
29
|
-
React.createElement(ExternalHyperlink, { href: "https://canvas.workdaydesign.com/" }, "Workday Design Principles.")),
|
|
29
|
+
React.createElement(ExternalHyperlink, { href: "https://canvas.workdaydesign.com/", iconLabel: "Open docs in new window" }, "Workday Design Principles.")),
|
|
30
30
|
React.createElement(Heading, { size: "medium", borderBottom: `1px solid ${colors.blueberry200}`, paddingBottom: "xxs" }, "Quick Links"),
|
|
31
31
|
React.createElement(Grid, { gridAutoColumns: "auto", gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))", gridGap: "s" },
|
|
32
32
|
React.createElement(Grid, { as: Card, gridTemplateRows: "1fr 1fr 2fr 1fr", depth: "none", display: "grid", maxHeight: 320 },
|
|
@@ -16,6 +16,9 @@ any questions.
|
|
|
16
16
|
|
|
17
17
|
- [Codemod](#codemod)
|
|
18
18
|
- [Instructions](#instructions)
|
|
19
|
+
- [Component Updates](#component-updates)
|
|
20
|
+
- [Styling API and CSS Tokens](#styling-api-and-css-tokens)
|
|
21
|
+
- [External Hyperlink](#external-hyperlink)
|
|
19
22
|
- [Troubleshooting](#troubleshooting)
|
|
20
23
|
- [Glossary](#glossary)
|
|
21
24
|
- [Main](#main)
|
|
@@ -83,6 +86,44 @@ yarn remove @workday/canvas-kit-codemod
|
|
|
83
86
|
> after executing the codemod, as its resulting formatting (spacing, quotes, etc.) may not match
|
|
84
87
|
> your project conventions.
|
|
85
88
|
|
|
89
|
+
## Component Updates
|
|
90
|
+
|
|
91
|
+
### Styling API and CSS Tokens
|
|
92
|
+
|
|
93
|
+
**PRs:** [#3101](https://github.com/Workday/canvas-kit/pull/3101), [#3088](https://github.com/Workday/canvas-kit/pull/3088)
|
|
94
|
+
|
|
95
|
+
Several components have been refactored to use our
|
|
96
|
+
[Canvas Tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-getting-started--docs) and
|
|
97
|
+
[styling API](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--create-modifiers#createstyles-api).
|
|
98
|
+
The React interface **has not changed**, but CSS variables are now used for dynamic properties.
|
|
99
|
+
|
|
100
|
+
> **Note:** These components also support our `cs` prop for styling. Learn more about styling
|
|
101
|
+
> with `cs` in our
|
|
102
|
+
> [documentation](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--cs-prop).
|
|
103
|
+
|
|
104
|
+
The following components are affected:
|
|
105
|
+
|
|
106
|
+
- `ExternalHyperlink`
|
|
107
|
+
- `Skeleton`
|
|
108
|
+
|
|
109
|
+
## External Hyperlink
|
|
110
|
+
|
|
111
|
+
**PR:** [#3101](https://github.com/Workday/canvas-kit/pull/3101)
|
|
112
|
+
|
|
113
|
+
`iconLabel` is now a *required* prop. We've removed the default `aria-label` of `Opens link in new window` to better support internationalization. You must provide a value to `iconLabel`.
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
//v12
|
|
117
|
+
<ExternalHyperlink href="https://workday.com">
|
|
118
|
+
External Hyperlink
|
|
119
|
+
</ExternalHyperlink>
|
|
120
|
+
|
|
121
|
+
//v13
|
|
122
|
+
<ExternalHyperlink href="https://workday.com" iconLabel='Open link in new window'>
|
|
123
|
+
External Hyperlink
|
|
124
|
+
</ExternalHyperlink>
|
|
125
|
+
```
|
|
126
|
+
|
|
86
127
|
|
|
87
128
|
## Troubleshooting
|
|
88
129
|
|
|
@@ -3,5 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import {ExternalHyperlink} from '@workday/canvas-kit-react/button';
|
|
4
4
|
|
|
5
5
|
export default () => (
|
|
6
|
-
<ExternalHyperlink href="https://workday.com"
|
|
6
|
+
<ExternalHyperlink href="https://workday.com" iconLabel="Opens link in new window">
|
|
7
|
+
External Hyperlink
|
|
8
|
+
</ExternalHyperlink>
|
|
7
9
|
);
|
|
@@ -12,7 +12,11 @@ const parentContainerStyles = createStyles({
|
|
|
12
12
|
|
|
13
13
|
export default () => (
|
|
14
14
|
<Box cs={parentContainerStyles}>
|
|
15
|
-
<ExternalHyperlink
|
|
15
|
+
<ExternalHyperlink
|
|
16
|
+
href="https://workday.com"
|
|
17
|
+
variant="inverse"
|
|
18
|
+
iconLabel="Opens link in new window"
|
|
19
|
+
>
|
|
16
20
|
Hyperlink
|
|
17
21
|
</ExternalHyperlink>
|
|
18
22
|
</Box>
|
package/lib/StylePropsTable.tsx
CHANGED
|
@@ -38,7 +38,7 @@ export const StylePropsTable = ({styleProps = []}: StylePropsTableProps) => {
|
|
|
38
38
|
const mdnUrl = `https://developer.mozilla.org/en-US/docs/Web/CSS/${formattedName}`;
|
|
39
39
|
return (
|
|
40
40
|
<Box display="inline-block" marginInlineEnd="xxxs">
|
|
41
|
-
<ExternalHyperlink href={mdnUrl} key={i}>
|
|
41
|
+
<ExternalHyperlink href={mdnUrl} key={i} iconLabel="Open link in new window">
|
|
42
42
|
{formattedName}
|
|
43
43
|
</ExternalHyperlink>
|
|
44
44
|
</Box>
|
package/lib/widgets/external.tsx
CHANGED
|
@@ -8,7 +8,9 @@ import {registerWidget} from '../Value';
|
|
|
8
8
|
|
|
9
9
|
registerWidget<ExternalSymbolValue>('external', ({value}) => (
|
|
10
10
|
<>
|
|
11
|
-
<ExternalHyperlink href={value.url}>
|
|
11
|
+
<ExternalHyperlink href={value.url} iconLabel="Open link in new window">
|
|
12
|
+
{value.name}
|
|
13
|
+
</ExternalHyperlink>
|
|
12
14
|
{renderTypeParameters(value.typeParameters)}
|
|
13
15
|
</>
|
|
14
16
|
));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.1009-next.0",
|
|
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": "^13.0.0-alpha.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^13.0.0-alpha.
|
|
49
|
-
"@workday/canvas-kit-react": "^13.0.0-alpha.
|
|
50
|
-
"@workday/canvas-kit-styling": "^13.0.0-alpha.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^13.0.0-alpha.1009-next.0",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^13.0.0-alpha.1009-next.0",
|
|
49
|
+
"@workday/canvas-kit-react": "^13.0.0-alpha.1009-next.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^13.0.0-alpha.1009-next.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^2.1.0",
|
|
53
53
|
"markdown-to-jsx": "^7.2.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"mkdirp": "^1.0.3",
|
|
61
61
|
"typescript": "5.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "86905802e45baf8c7c06c3f673597dc2792c6dc5"
|
|
64
64
|
}
|