@workday/canvas-kit-docs 16.0.0-alpha.0462-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.
@@ -15,9 +15,12 @@ Soon to be...
15
15
  - [New Components](#new-components)
16
16
  - [KBD](#kbd)
17
17
  - [Component Updates](#component-updates)
18
+ - [Action Bar](#action-bar)
18
19
  - [Avatar](#avatar)
19
- - [Buttons](#buttons) - [Delete Button Outline Variant](#delete-button-outline-variant)
20
+ - [Buttons](#buttons)
21
+ - [Delete Button Outline Variant](#delete-button-outline-variant)
20
22
  - [Card](#card)
23
+ - [Form Field](#form-field)
21
24
  - [Inputs](#inputs)
22
25
  - [Accessibility: Checked-State Contrast](#accessibility-checked-state-contrast)
23
26
  - [Checkbox](#checkbox)
@@ -29,6 +32,9 @@ Soon to be...
29
32
  - [Text Area](#text-area)
30
33
  - [Text Input](#text-input)
31
34
  - [Menu](#menu)
35
+ - [Segmented Control](#segmented-control)
36
+ - [Toast](#toast)
37
+ - [Tooltip](#tooltip)
32
38
  - [New Utilities](#new-utilities)
33
39
  - [cornerShapeStencil](#cornershapestencil)
34
40
  - [Deprecations](#deprecations)
@@ -131,6 +137,14 @@ functional shortcuts, refer to the storybook documentation and our example stori
131
137
 
132
138
  ## Component Updates
133
139
 
140
+ ### Action Bar
141
+
142
+ **PR:** [#4048](https://github.com/Workday/canvas-kit/pull/4048)
143
+
144
+ #### Visual Updates
145
+
146
+ - `ActionBar` padding has been updated to `padding.md` (16px).
147
+
134
148
  ### Avatar
135
149
 
136
150
  **PR:** [#3981](https://github.com/Workday/canvas-kit/pull/3981)
@@ -331,6 +345,36 @@ If you customize `brand.success.base` in your theme, please verify the following
331
345
  - Error and caution states no longer display a status background color; only the standard background
332
346
  is shown.
333
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
+
334
378
  ### Menu
335
379
 
336
380
  **PR:** [#3987](https://github.com/Workday/canvas-kit/pull/3987)
@@ -404,6 +448,25 @@ Used in `Select`, `Combobox`, and other listbox menus. Selected states apply whe
404
448
  | Disabled + Focus (`aria-disabled="true"`) | Solid blue fill and white text with disabled opacity (dims focus style) | Light blue background and blue text (`brand.surface.selected` / `brand.fg.selected`) with disabled opacity (dims focus indicator) |
405
449
  | Disabled + Selected | Solid blue fill and white text with disabled opacity | Light blue background and blue text (`brand.surface.selected` / `brand.fg.selected`) with disabled opacity |
406
450
 
451
+ ### Segmented Control
452
+
453
+ **PR:** [#4048](https://github.com/Workday/canvas-kit/pull/4048)
454
+
455
+
456
+ #### Visual Updates
457
+
458
+ - Container background changed from `surface.alt.strong` to `surface.alt.default` (a lighter background color).
459
+ - Border radius changed to `shape.full` (full rounded corners) on the container.
460
+ - Grid gap reduced from `gap.sm` (8px) to `gap.xs` (4px).
461
+ - Selected/pressed item now uses boxShadow: system.depth[2] instead of a visible border.
462
+ - Font weight changed from bold to medium (base and small sizes);
463
+ - Medium size now uses semi-bold font weight.
464
+ - Size adjustments: large height shrunk to size.sm (32px) (was size.md (40px));
465
+ - Medium size is now 28px in height (was 32px).
466
+ - Hover and pressed states now use `surface.overlay.hover.default` and `surface.overlay.pressed.default` respectively for the item.
467
+ - Container padding changed to `padding.md` (16px) including for mobile devices.
468
+ - On mobile devices, the container padding remains `padding.md` (16px).
469
+
407
470
  ## New Utilities
408
471
 
409
472
  ### cornerShapeStencil
@@ -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
+ };
@@ -66,8 +66,7 @@ When users interact with a `SegmentedControl` using screen readers:
66
66
  `aria-label="View options"`)
67
67
  - Each button announces its text/label, "toggle button" role, and pressed/unpressed state (e.g.,
68
68
  "List view, toggle button, pressed" or "Grid view, toggle button, not pressed")
69
- - For icon-only buttons with tooltips, the tooltip text is announced along with the button role and
70
- state
69
+ - icon-only items must have an accessible name, supplied by visible text, aria-label, or a Tooltip in label mode.
71
70
  - When a button is activated, screen readers should announce the new state
72
71
 
73
72
  Refer to [Button](?path=/docs/components-buttons--docs#accessibility) for more information about
@@ -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.0462-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.0462-next.0",
51
- "@workday/canvas-kit-preview-react": "^16.0.0-alpha.0462-next.0",
52
- "@workday/canvas-kit-react": "^16.0.0-alpha.0462-next.0",
53
- "@workday/canvas-kit-styling": "^16.0.0-alpha.0462-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": "d80e8648cba4c3445351b3277c46f5c418f0de93"
66
+ "gitHead": "e91ae68242623c9e4d24b9fbdc3ce7ea8368c425"
67
67
  }