@workday/canvas-kit-docs 16.0.0-alpha.0424-next.0 → 16.0.0-alpha.0431-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/docs.js +77 -0
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +5 -5
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +5 -5
- package/dist/mdx/16.0-UPGRADE-GUIDE.mdx +38 -0
- package/dist/mdx/react/button/button/Button.mdx +8 -3
- package/dist/mdx/react/button/button/examples/DeleteOutline.tsx +26 -0
- package/package.json +7 -7
package/dist/es6/lib/docs.js
CHANGED
|
@@ -124250,6 +124250,23 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
124250
124250
|
"componentType": "regular",
|
|
124251
124251
|
"displayName": "DeleteButton",
|
|
124252
124252
|
"props": [
|
|
124253
|
+
{
|
|
124254
|
+
"kind": "property",
|
|
124255
|
+
"name": "variant",
|
|
124256
|
+
"required": false,
|
|
124257
|
+
"type": {
|
|
124258
|
+
"kind": "string",
|
|
124259
|
+
"value": "outline"
|
|
124260
|
+
},
|
|
124261
|
+
"description": "Variant has an option for `outline` which will reverse the styling of the button",
|
|
124262
|
+
"declarations": [
|
|
124263
|
+
{
|
|
124264
|
+
"name": "variant",
|
|
124265
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/button/lib/DeleteButton.tsx"
|
|
124266
|
+
}
|
|
124267
|
+
],
|
|
124268
|
+
"tags": {}
|
|
124269
|
+
},
|
|
124253
124270
|
{
|
|
124254
124271
|
"kind": "property",
|
|
124255
124272
|
"name": "iconPosition",
|
|
@@ -446670,6 +446687,66 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
446670
446687
|
}
|
|
446671
446688
|
}
|
|
446672
446689
|
},
|
|
446690
|
+
{
|
|
446691
|
+
"name": "createProgram",
|
|
446692
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/createTypeScriptWatchProgram.ts",
|
|
446693
|
+
"description": "Create a one-shot TypeScript program suitable for production builds.",
|
|
446694
|
+
"declarations": [
|
|
446695
|
+
{
|
|
446696
|
+
"name": "createProgram",
|
|
446697
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/createTypeScriptWatchProgram.ts"
|
|
446698
|
+
}
|
|
446699
|
+
],
|
|
446700
|
+
"tags": {},
|
|
446701
|
+
"type": {
|
|
446702
|
+
"kind": "function",
|
|
446703
|
+
"parameters": [
|
|
446704
|
+
{
|
|
446705
|
+
"kind": "parameter",
|
|
446706
|
+
"name": "tsconfigPath",
|
|
446707
|
+
"type": {
|
|
446708
|
+
"kind": "primitive",
|
|
446709
|
+
"value": "string"
|
|
446710
|
+
},
|
|
446711
|
+
"required": true,
|
|
446712
|
+
"rest": false,
|
|
446713
|
+
"description": "",
|
|
446714
|
+
"declarations": [
|
|
446715
|
+
{
|
|
446716
|
+
"name": "tsconfigPath",
|
|
446717
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/createTypeScriptWatchProgram.ts"
|
|
446718
|
+
}
|
|
446719
|
+
],
|
|
446720
|
+
"tags": {}
|
|
446721
|
+
},
|
|
446722
|
+
{
|
|
446723
|
+
"kind": "parameter",
|
|
446724
|
+
"name": "compilerOptions",
|
|
446725
|
+
"type": {
|
|
446726
|
+
"kind": "symbol",
|
|
446727
|
+
"name": "ts.CompilerOptions",
|
|
446728
|
+
"value": "CompilerOptions"
|
|
446729
|
+
},
|
|
446730
|
+
"required": true,
|
|
446731
|
+
"rest": false,
|
|
446732
|
+
"description": "",
|
|
446733
|
+
"declarations": [
|
|
446734
|
+
{
|
|
446735
|
+
"name": "compilerOptions",
|
|
446736
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/createTypeScriptWatchProgram.ts"
|
|
446737
|
+
}
|
|
446738
|
+
],
|
|
446739
|
+
"tags": {}
|
|
446740
|
+
}
|
|
446741
|
+
],
|
|
446742
|
+
"members": [],
|
|
446743
|
+
"returnType": {
|
|
446744
|
+
"kind": "symbol",
|
|
446745
|
+
"name": "ts.Program",
|
|
446746
|
+
"value": "Program"
|
|
446747
|
+
}
|
|
446748
|
+
}
|
|
446749
|
+
},
|
|
446673
446750
|
{
|
|
446674
446751
|
"name": "getCompilerOptions",
|
|
446675
446752
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/createTypeScriptWatchProgram.ts",
|
|
@@ -18,11 +18,11 @@ export const packageJSONFile = `{
|
|
|
18
18
|
"@emotion/react": "11.11.4",
|
|
19
19
|
"@types/react": "18.2.60",
|
|
20
20
|
"@types/react-dom": "18.2.19",
|
|
21
|
-
"@workday/canvas-kit-labs-react": "15.0.
|
|
22
|
-
"@workday/canvas-kit-preview-react": "15.0.
|
|
23
|
-
"@workday/canvas-kit-react": "15.0.
|
|
24
|
-
"@workday/canvas-kit-react-fonts": "^15.0.
|
|
25
|
-
"@workday/canvas-kit-styling": "15.0.
|
|
21
|
+
"@workday/canvas-kit-labs-react": "15.0.17",
|
|
22
|
+
"@workday/canvas-kit-preview-react": "15.0.17",
|
|
23
|
+
"@workday/canvas-kit-react": "15.0.17",
|
|
24
|
+
"@workday/canvas-kit-react-fonts": "^15.0.17",
|
|
25
|
+
"@workday/canvas-kit-styling": "15.0.17",
|
|
26
26
|
"@workday/canvas-system-icons-web": "4.0.2",
|
|
27
27
|
"@workday/canvas-expressive-icons-web": "1.0.1",
|
|
28
28
|
"@workday/canvas-tokens-web": "4.2.0"
|
|
@@ -19,11 +19,11 @@ export const packageJSONFile = `{
|
|
|
19
19
|
"@emotion/react": "11.11.4",
|
|
20
20
|
"@types/react": "18.2.60",
|
|
21
21
|
"@types/react-dom": "18.2.19",
|
|
22
|
-
"@workday/canvas-kit-labs-react": "15.0.
|
|
23
|
-
"@workday/canvas-kit-preview-react": "15.0.
|
|
24
|
-
"@workday/canvas-kit-react": "15.0.
|
|
25
|
-
"@workday/canvas-kit-react-fonts": "^15.0.
|
|
26
|
-
"@workday/canvas-kit-styling": "15.0.
|
|
22
|
+
"@workday/canvas-kit-labs-react": "15.0.17",
|
|
23
|
+
"@workday/canvas-kit-preview-react": "15.0.17",
|
|
24
|
+
"@workday/canvas-kit-react": "15.0.17",
|
|
25
|
+
"@workday/canvas-kit-react-fonts": "^15.0.17",
|
|
26
|
+
"@workday/canvas-kit-styling": "15.0.17",
|
|
27
27
|
"@workday/canvas-system-icons-web": "4.0.2",
|
|
28
28
|
"@workday/canvas-expressive-icons-web": "1.0.1",
|
|
29
29
|
"@workday/canvas-tokens-web": "4.2.0"
|
|
@@ -16,6 +16,8 @@ Soon to be...
|
|
|
16
16
|
- [KBD](#kbd)
|
|
17
17
|
- [Component Updates](#component-updates)
|
|
18
18
|
- [Avatar](#avatar)
|
|
19
|
+
- [Buttons](#buttons)
|
|
20
|
+
- [Delete Button Outline Variant](#delete-button-outline-variant)
|
|
19
21
|
- [Card](#card)
|
|
20
22
|
- [Color Input](#color-input)
|
|
21
23
|
- [Color Picker](#color-picker)
|
|
@@ -160,6 +162,42 @@ import {Avatar} from '@workday/canvas-kit-react/avatar';
|
|
|
160
162
|
No migration is required unless you rely on the previous color values for custom styling via the
|
|
161
163
|
`cs` prop or `baseAvatarStencil` modifiers.
|
|
162
164
|
|
|
165
|
+
### Buttons
|
|
166
|
+
|
|
167
|
+
**PR:** [#4000](https://github.com/Workday/canvas-kit/pull/4000)
|
|
168
|
+
|
|
169
|
+
All buttons have had the following updates:
|
|
170
|
+
|
|
171
|
+
- `fontWeight` has been updated from `system.fontWeight.bold` to `system.fontWeight.medium`.
|
|
172
|
+
- `minWidth` has been updated to the following:
|
|
173
|
+
|
|
174
|
+
| Default Size | minWidth v15 | minWidth v16 |
|
|
175
|
+
| ------------ | ------------ | ------------ |
|
|
176
|
+
| extraSmall | unchanged | unchanged |
|
|
177
|
+
| small | `5rem` | `4.5rem` |
|
|
178
|
+
| medium | `6rem` | `5.5rem` |
|
|
179
|
+
| large | `7rem` | `6.5rem` |
|
|
180
|
+
|
|
181
|
+
- `paddingInline` has been updated to the following:
|
|
182
|
+
|
|
183
|
+
| Size | paddingInline v15 | paddingInline v16 |
|
|
184
|
+
| ---------- | ----------------- | ----------------- |
|
|
185
|
+
| extraSmall | `0.75rem` | `0.5rem` |
|
|
186
|
+
| small | `1rem` | `0.75rem` |
|
|
187
|
+
| medium | `1.5rem` | `1rem` |
|
|
188
|
+
| large | `2rem` | `1.25rem` |
|
|
189
|
+
|
|
190
|
+
#### Delete Button Outline Variant
|
|
191
|
+
|
|
192
|
+
We've added an `outline` variant to the `DeleteButton` component. This variant will reverse the
|
|
193
|
+
button's styling with a `border` and `transparent` background.
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
197
|
+
|
|
198
|
+
<DeleteButton variant="outline">Delete</DeleteButton>;
|
|
199
|
+
```
|
|
200
|
+
|
|
163
201
|
### Card
|
|
164
202
|
|
|
165
203
|
**PR:** [#4014](https://github.com/Workday/canvas-kit/pull/4014)
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import CustomStyles from './examples/CustomStyles';
|
|
9
9
|
import Delete from './examples/Delete';
|
|
10
|
+
import DeleteOutline from './examples/DeleteOutline';
|
|
10
11
|
import Grow from './examples/Grow';
|
|
11
12
|
import Primary from './examples/Primary';
|
|
12
13
|
import PrimaryInverse from './examples/PrimaryInverse';
|
|
@@ -41,7 +42,7 @@ The example below shows multiple instances of a `PrimaryButton` with various ico
|
|
|
41
42
|
|
|
42
43
|
Primary Buttons also have an `inverse` variant. While it looks similar to the default Secondary
|
|
43
44
|
Button, the default outline as well as the hover and focus states are different. Use this variant
|
|
44
|
-
when you need to place a Primary Button on a dark or colorful background such as `
|
|
45
|
+
when you need to place a Primary Button on a dark or colorful background such as `neutral400`.
|
|
45
46
|
|
|
46
47
|
<ExampleCodeBlock code={PrimaryInverse} />
|
|
47
48
|
|
|
@@ -54,7 +55,7 @@ The example below shows multiple instances of a `SecondaryButton` with various i
|
|
|
54
55
|
<ExampleCodeBlock code={Secondary} />
|
|
55
56
|
|
|
56
57
|
Secondary Buttons also have an `inverse` variant. Use this when you need to place a Secondary Button
|
|
57
|
-
on a dark or colorful background such as `
|
|
58
|
+
on a dark or colorful background such as `neutral400`.
|
|
58
59
|
|
|
59
60
|
<ExampleCodeBlock code={SecondaryInverse} />
|
|
60
61
|
|
|
@@ -67,7 +68,7 @@ The example below shows multiple instances of a `TertiaryButton` with various ic
|
|
|
67
68
|
<ExampleCodeBlock code={Tertiary} />
|
|
68
69
|
|
|
69
70
|
Tertiary Buttons also have an `inverse` variant. Use this when you need to place a Tertiary Button
|
|
70
|
-
on a dark or colorful background such as `
|
|
71
|
+
on a dark or colorful background such as `neutral400`.
|
|
71
72
|
|
|
72
73
|
<ExampleCodeBlock code={TertiaryInverse} />
|
|
73
74
|
|
|
@@ -77,6 +78,10 @@ on a dark or colorful background such as `blueberry400`.
|
|
|
77
78
|
|
|
78
79
|
<ExampleCodeBlock code={Delete} />
|
|
79
80
|
|
|
81
|
+
Delete Buttons also have an `outline` variant.
|
|
82
|
+
|
|
83
|
+
<ExampleCodeBlock code={DeleteOutline} />
|
|
84
|
+
|
|
80
85
|
### Grow Prop
|
|
81
86
|
|
|
82
87
|
The example below shows the use of the `grow` prop on different variants of buttons. This will set
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
2
|
+
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
3
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
4
|
+
import {trashIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
+
|
|
7
|
+
const parentContainerStyles = createStyles({
|
|
8
|
+
display: 'flex',
|
|
9
|
+
gap: system.gap.md,
|
|
10
|
+
padding: system.padding.md,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export default () => (
|
|
14
|
+
<div className={parentContainerStyles}>
|
|
15
|
+
<DeleteButton variant="outline">Delete</DeleteButton>
|
|
16
|
+
<DeleteButton icon={trashIcon} iconPosition="start" variant="outline">
|
|
17
|
+
Delete
|
|
18
|
+
</DeleteButton>
|
|
19
|
+
<DeleteButton icon={trashIcon} iconPosition="end" variant="outline">
|
|
20
|
+
Delete
|
|
21
|
+
</DeleteButton>
|
|
22
|
+
<Tooltip title="Delete">
|
|
23
|
+
<DeleteButton icon={trashIcon} variant="outline" />
|
|
24
|
+
</Tooltip>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "16.0.0-alpha.
|
|
3
|
+
"version": "16.0.0-alpha.0431-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",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@stackblitz/sdk": "^1.11.0",
|
|
48
48
|
"@storybook/csf": "0.0.1",
|
|
49
49
|
"@workday/canvas-expressive-icons-web": "1.0.2",
|
|
50
|
-
"@workday/canvas-kit-labs-react": "^16.0.0-alpha.
|
|
51
|
-
"@workday/canvas-kit-preview-react": "^16.0.0-alpha.
|
|
52
|
-
"@workday/canvas-kit-react": "^16.0.0-alpha.
|
|
53
|
-
"@workday/canvas-kit-styling": "^16.0.0-alpha.
|
|
50
|
+
"@workday/canvas-kit-labs-react": "^16.0.0-alpha.0431-next.0",
|
|
51
|
+
"@workday/canvas-kit-preview-react": "^16.0.0-alpha.0431-next.0",
|
|
52
|
+
"@workday/canvas-kit-react": "^16.0.0-alpha.0431-next.0",
|
|
53
|
+
"@workday/canvas-kit-styling": "^16.0.0-alpha.0431-next.0",
|
|
54
54
|
"@workday/canvas-system-icons-web": "4.0.4",
|
|
55
|
-
"@workday/canvas-tokens-web": "4.4.0-beta.
|
|
55
|
+
"@workday/canvas-tokens-web": "4.4.0-beta.3",
|
|
56
56
|
"markdown-to-jsx": "^7.2.0",
|
|
57
57
|
"react-syntax-highlighter": "^15.5.0",
|
|
58
58
|
"ts-node": "^10.9.1"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"mkdirp": "^1.0.3",
|
|
64
64
|
"typescript": "5.0"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "4c60e57196dd7159579dde8977cc784182cc6171"
|
|
67
67
|
}
|