@workday/canvas-kit-docs 16.0.0-alpha.0463-next.0 → 16.0.0-alpha.0464-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.
@@ -17,7 +17,8 @@ Soon to be...
17
17
  - [Component Updates](#component-updates)
18
18
  - [Action Bar](#action-bar)
19
19
  - [Avatar](#avatar)
20
- - [Buttons](#buttons) - [Delete Button Outline Variant](#delete-button-outline-variant)
20
+ - [Buttons](#buttons)
21
+ - [Delete Button Outline Variant](#delete-button-outline-variant)
21
22
  - [Card](#card)
22
23
  - [Form Field](#form-field)
23
24
  - [Inputs](#inputs)
@@ -32,6 +33,8 @@ Soon to be...
32
33
  - [Text Input](#text-input)
33
34
  - [Menu](#menu)
34
35
  - [Segmented Control](#segmented-control)
36
+ - [Toast](#toast)
37
+ - [Tooltip](#tooltip)
35
38
  - [New Utilities](#new-utilities)
36
39
  - [cornerShapeStencil](#cornershapestencil)
37
40
  - [Deprecations](#deprecations)
@@ -342,6 +345,36 @@ If you customize `brand.success.base` in your theme, please verify the following
342
345
  - Error and caution states no longer display a status background color; only the standard background
343
346
  is shown.
344
347
 
348
+ ### Toast
349
+
350
+ **PR:** [#4053](https://github.com/Workday/canvas-kit/pull/4053)
351
+
352
+ #### Visual Updates
353
+
354
+ - Padding is now applied to the `Toast` container itself instead of being distributed across
355
+ `Toast.Body` and `Toast.Icon`.
356
+ - Gap between the icon, body, and close icon is now `base.size150` (12px).
357
+ - Shape uses `system.shape.xl`.
358
+ - `Toast.Body` no longer has a gap between text and link.
359
+ - `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
360
+ LTR).
361
+ - `Toast.CloseIcon` was changed to be `extraSmall` tertiary button.
362
+
363
+ ### Tooltip
364
+
365
+ **PR:** [#4053](https://github.com/Workday/canvas-kit/pull/4053)
366
+
367
+ #### Visual Updates
368
+
369
+ - The default tooltip has been restyled from a dark surface to a light surface.
370
+ - A visible border (`system.color.border.default`) is now applied to the container, replacing the
371
+ previous transparent outline.
372
+ - Tooltip boundaries remain visible in Windows High Contrast mode: when High Contrast is detected,
373
+ Tooltip uses a solid outline (`outline: solid 1px CanvasText`) to ensure clear visibility.
374
+ - Shape is now fully rounded using `system.shape.full`.
375
+ - Type level is now `subtext.lg` (previously `subtext.md`).
376
+ - Padding and spacing have been adjusted to accommodate the new styling.
377
+
345
378
  ### Menu
346
379
 
347
380
  **PR:** [#3987](https://github.com/Workday/canvas-kit/pull/3987)
@@ -2,6 +2,7 @@ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
 
3
3
  import {KBD} from '@workday/canvas-kit-labs-react/kbd';
4
4
  import Basic from './examples/Basic';
5
+ import InTooltip from './examples/InTooltip';
5
6
  import Items from './examples/Items';
6
7
  import RTL from './examples/RTL';
7
8
  import Size from './examples/Size';
@@ -66,6 +67,13 @@ standard style or `plain` for a more minimal appearance. The `variant` is shared
66
67
 
67
68
  <ExampleCodeBlock code={Variant} />
68
69
 
70
+ ### In Tooltip
71
+
72
+ `KBD` can be used inside a `Tooltip` to communicate the keyboard shortcut associated with an
73
+ interactive control. Pair it with descriptive text so the shortcut is easy to understand.
74
+
75
+ <ExampleCodeBlock code={InTooltip} />
76
+
69
77
  ## Accessibility
70
78
 
71
79
  `KBD` is **presentational and semantic text**. It renders a `kbd` element so assistive technology
@@ -73,6 +81,11 @@ can recognize the content as keyboard input, but it does **not** make a keyboard
73
81
  expose it to the browser. It is the visual/semantic representation of a key, not the accessibility
74
82
  contract for a functioning shortcut.
75
83
 
84
+ - `aria-keyshortcuts` isn't supposed to go on the presentational KBD wrapper, it should be on the interactive control with the key listener.
85
+ - The `<KBD.Item>` components that use glyphs need translated aria-label strings. (E.g. "Command", "Control", etc.)
86
+
87
+
88
+
76
89
  ### Provide spoken labels for symbolic or abbreviated keys
77
90
 
78
91
  Glyphs and abbreviations such as <kbd>⌘</kbd>, <kbd>⌥</kbd>, <kbd>⇧</kbd>, and arrow keys are **not
@@ -0,0 +1,38 @@
1
+ import {KBD} from '@workday/canvas-kit-labs-react/kbd';
2
+ import {SecondaryButton} from '@workday/canvas-kit-react/button';
3
+ import {Subtext} from '@workday/canvas-kit-react/text';
4
+ import {Tooltip} from '@workday/canvas-kit-react/tooltip';
5
+ import {createStyles} from '@workday/canvas-kit-styling';
6
+ import {copyIcon} from '@workday/canvas-system-icons-web';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const flexContainer = createStyles({
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ gap: system.gap.xs,
13
+ p: {
14
+ margin: 0,
15
+ },
16
+ });
17
+
18
+ export default () => {
19
+ return (
20
+ <Tooltip
21
+ title={
22
+ <div className={flexContainer}>
23
+ <Subtext size="large">Copy to clipboard</Subtext>
24
+ <KBD>
25
+ <KBD.Item>
26
+ <KBD variant="plain">
27
+ <KBD.Item aria-label="Command">⌘</KBD.Item>
28
+ <KBD.Item>C</KBD.Item>
29
+ </KBD>
30
+ </KBD.Item>
31
+ </KBD>
32
+ </div>
33
+ }
34
+ >
35
+ <SecondaryButton icon={copyIcon} aria-keyshortcuts="Command+C" />
36
+ </Tooltip>
37
+ );
38
+ };
@@ -5,7 +5,7 @@ import {system} from '@workday/canvas-tokens-web';
5
5
  export default () => {
6
6
  return (
7
7
  <Toast>
8
- <Toast.Icon icon={checkIcon} color={system.color.fg.success.default} />
8
+ <Toast.Icon icon={checkIcon} color={system.color.brand.fg.positive.default} />
9
9
  <Toast.Body>
10
10
  <Toast.Message>Your workbook was successfully processed.</Toast.Message>
11
11
  </Toast.Body>
@@ -9,7 +9,7 @@ export default () => {
9
9
  return (
10
10
  <CanvasProvider dir="rtl">
11
11
  <Toast>
12
- <Toast.Icon icon={checkIcon} color={system.color.fg.success.default} />
12
+ <Toast.Icon icon={checkIcon} color={system.color.brand.fg.positive.default} />
13
13
  <Toast.Body>
14
14
  <Toast.Message>Your workbook was successfully processed.</Toast.Message>
15
15
  </Toast.Body>
@@ -4,7 +4,7 @@ import {system} from '@workday/canvas-tokens-web';
4
4
 
5
5
  export default () => (
6
6
  <Toast mode="alert">
7
- <Toast.Icon icon={exclamationCircleIcon} color={system.color.fg.warning.default} />
7
+ <Toast.Icon icon={exclamationCircleIcon} color={system.color.brand.fg.caution.default} />
8
8
  <Toast.Body>
9
9
  <Toast.Message>There was an error with your workbook.</Toast.Message>
10
10
  </Toast.Body>
@@ -4,7 +4,7 @@ import {system} from '@workday/canvas-tokens-web';
4
4
 
5
5
  export default () => (
6
6
  <Toast mode="dialog" aria-label="notification">
7
- <Toast.Icon icon={checkIcon} color={system.color.fg.success.default} />
7
+ <Toast.Icon icon={checkIcon} color={system.color.brand.fg.positive.default} />
8
8
  <Toast.Body>
9
9
  <Toast.Message>Your workbook was successfully processed.</Toast.Message>
10
10
  <Toast.Link href="#hreflink">Custom Link</Toast.Link>
@@ -7,7 +7,7 @@ export default () => {
7
7
 
8
8
  return (
9
9
  <Toast mode="dialog" aria-label="notification">
10
- <Toast.Icon icon={checkIcon} color={system.color.fg.success.default} />
10
+ <Toast.Icon icon={checkIcon} color={system.color.brand.fg.positive.default} />
11
11
  <Toast.Body>
12
12
  <Toast.Message>Your workbook was successfully</Toast.Message>
13
13
  <Toast.Link href="#hyperlink">Custom Link</Toast.Link>
@@ -23,7 +23,7 @@ export default () => {
23
23
  <SecondaryButton onClick={handleOpen}>Show Toast</SecondaryButton>
24
24
  <Popper placement="bottom-end" open={open} anchorElement={containerRef}>
25
25
  <Toast mode="dialog" aria-label="notification">
26
- <Toast.Icon icon={checkIcon} color={system.color.fg.success.default} />
26
+ <Toast.Icon icon={checkIcon} color={system.color.brand.fg.positive.default} />
27
27
  <Toast.Body>
28
28
  <Toast.Message>Your workbook was successfully processed.</Toast.Message>
29
29
  </Toast.Body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "16.0.0-alpha.0463-next.0",
3
+ "version": "16.0.0-alpha.0464-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,10 +47,10 @@
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.0463-next.0",
51
- "@workday/canvas-kit-preview-react": "^16.0.0-alpha.0463-next.0",
52
- "@workday/canvas-kit-react": "^16.0.0-alpha.0463-next.0",
53
- "@workday/canvas-kit-styling": "^16.0.0-alpha.0463-next.0",
50
+ "@workday/canvas-kit-labs-react": "^16.0.0-alpha.0464-next.0",
51
+ "@workday/canvas-kit-preview-react": "^16.0.0-alpha.0464-next.0",
52
+ "@workday/canvas-kit-react": "^16.0.0-alpha.0464-next.0",
53
+ "@workday/canvas-kit-styling": "^16.0.0-alpha.0464-next.0",
54
54
  "@workday/canvas-system-icons-web": "4.0.4",
55
55
  "@workday/canvas-tokens-web": "4.4.0-beta.6",
56
56
  "markdown-to-jsx": "^7.2.0",
@@ -63,5 +63,5 @@
63
63
  "mkdirp": "^1.0.3",
64
64
  "typescript": "5.0"
65
65
  },
66
- "gitHead": "f21d7cc4d8f56e8a7ffffbb5881aa903f852c025"
66
+ "gitHead": "e91ae68242623c9e4d24b9fbdc3ce7ea8368c425"
67
67
  }