@workday/canvas-kit-docs 11.0.0-alpha.716-next.0 → 11.0.0-alpha.721-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.
|
@@ -21,9 +21,11 @@ any questions.
|
|
|
21
21
|
- [Component Style Updates](#component-style-updates)
|
|
22
22
|
- [Card](#card)
|
|
23
23
|
- [Checkbox](#checkbox)
|
|
24
|
+
- [Combobox](#combobox)
|
|
24
25
|
- [Count Badge](#count-badge)
|
|
25
26
|
- [Form Field Preview](#form-field-preview)
|
|
26
27
|
- [Radio (Preview)](#radio-preview)
|
|
28
|
+
- [Select](#select)
|
|
27
29
|
- [Switch](#switch)
|
|
28
30
|
- [Table (Preview)](#table-preview)
|
|
29
31
|
- [Text](#text)
|
|
@@ -418,9 +420,22 @@ no longer extends the `Box` component, however, it still supports Emotion `style
|
|
|
418
420
|
|
|
419
421
|
**PR:** [#2542](https://github.com/Workday/canvas-kit/pull/2542)
|
|
420
422
|
|
|
421
|
-
`Checkbox` now uses
|
|
422
|
-
|
|
423
|
-
|
|
423
|
+
`Checkbox` now uses
|
|
424
|
+
[Canvas Tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-getting-started--docs) and
|
|
425
|
+
our
|
|
426
|
+
[new styling utilities](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--create-modifiers#createstyles-api).
|
|
427
|
+
The component now supports the `cs` prop, but otherwise the API has not changed. It should behave
|
|
428
|
+
identically as it did in previous versions.
|
|
429
|
+
|
|
430
|
+
### Combobox
|
|
431
|
+
|
|
432
|
+
**PR:** [#2570](https://github.com/Workday/canvas-kit/pull/2570)
|
|
433
|
+
|
|
434
|
+
`Combobox` has been refactored to use our
|
|
435
|
+
[new styling utilities](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--create-modifiers#createstyles-api)
|
|
436
|
+
and [tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-getting-started--docs). The
|
|
437
|
+
component now supports the `cs` prop, but otherwise the API has not changed. It should behave
|
|
438
|
+
identically as it did in previous versions.
|
|
424
439
|
|
|
425
440
|
### Count Badge
|
|
426
441
|
|
|
@@ -491,6 +506,15 @@ our
|
|
|
491
506
|
The component now supports the `cs` prop, but otherwise the API has not changed. It should behave
|
|
492
507
|
identically as it did in previous versions.
|
|
493
508
|
|
|
509
|
+
### Select
|
|
510
|
+
|
|
511
|
+
**PR:** [#2570](https://github.com/Workday/canvas-kit/pull/2570)
|
|
512
|
+
|
|
513
|
+
`Select` has been refactored to use our
|
|
514
|
+
[new styling utilities](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--create-modifiers#createstyles-api)
|
|
515
|
+
and [tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-getting-started--docs). The
|
|
516
|
+
component now supports the `cs` prop, but otherwise the API has not changed. It should behave
|
|
517
|
+
|
|
494
518
|
### Switch
|
|
495
519
|
|
|
496
520
|
**PR:** [#2583](https://github.com/Workday/canvas-kit/pull/2583)
|
|
@@ -40,8 +40,7 @@ const movieListItems = [
|
|
|
40
40
|
|
|
41
41
|
export default () => {
|
|
42
42
|
const [id, setId] = React.useState('456');
|
|
43
|
-
const [
|
|
44
|
-
const [moviesLists, setMoviesList] = React.useState([]);
|
|
43
|
+
const [moviesLists, setMoviesList] = React.useState<typeof movieListItems>([]);
|
|
45
44
|
const [loadingStatus, setLoadingStatus] = React.useState<'idle' | 'loading' | 'success'>('idle');
|
|
46
45
|
const loadingRef = React.useRef<ReturnType<typeof setTimeout>>();
|
|
47
46
|
|
|
@@ -52,6 +51,8 @@ export default () => {
|
|
|
52
51
|
initialSelectedIds: [id],
|
|
53
52
|
});
|
|
54
53
|
|
|
54
|
+
const stringValue = moviesLists.find(item => item.serverId === id)?.label || '';
|
|
55
|
+
|
|
55
56
|
function loadItems() {
|
|
56
57
|
setLoadingStatus('loading');
|
|
57
58
|
loadingRef.current = setTimeout(() => {
|
|
@@ -68,13 +69,11 @@ export default () => {
|
|
|
68
69
|
|
|
69
70
|
return (
|
|
70
71
|
<Flex flexDirection="column" maxWidth={300}>
|
|
71
|
-
<div id="foo">Foo Bar</div>
|
|
72
72
|
<Select model={model}>
|
|
73
73
|
<FormField label="Choose a Film">
|
|
74
74
|
<Select.Input
|
|
75
75
|
onChange={e => {
|
|
76
76
|
setId(e.target.value);
|
|
77
|
-
setValue(model.navigation.getItem(e.target.value, model).textValue);
|
|
78
77
|
}}
|
|
79
78
|
placeholder={loadingStatus}
|
|
80
79
|
/>
|
|
@@ -90,7 +89,7 @@ export default () => {
|
|
|
90
89
|
</FormField>
|
|
91
90
|
</Select>
|
|
92
91
|
<div data-testid="selected-id">Selected Id: {id}</div>
|
|
93
|
-
<div data-testid="selected-value">Selected value: {
|
|
92
|
+
<div data-testid="selected-value">Selected value: {stringValue}</div>
|
|
94
93
|
<PrimaryButton
|
|
95
94
|
onClick={() => {
|
|
96
95
|
loadItems();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.721-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": "^11.0.0-alpha.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^11.0.0-alpha.
|
|
49
|
-
"@workday/canvas-kit-react": "^11.0.0-alpha.
|
|
50
|
-
"@workday/canvas-kit-styling": "^11.0.0-alpha.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^11.0.0-alpha.721-next.0",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^11.0.0-alpha.721-next.0",
|
|
49
|
+
"@workday/canvas-kit-react": "^11.0.0-alpha.721-next.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^11.0.0-alpha.721-next.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^1.0.2",
|
|
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": "e7fad00a4763b2f506fc08d6c419b4b251c7d925"
|
|
63
63
|
}
|