Skip to content

Commit e12ef42

Browse files
author
Alan Smith
committed
chore: Merge latest prerelease/major
2 parents af9bc4c + 54d08f7 commit e12ef42

119 files changed

Lines changed: 1050 additions & 1754 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.storybook/routes.js

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
// and will rewrite the URL to point to the correct URL for the story. The Storybook key will be
44
// rewritten to something like `?path=/docs/${id}`
55
const routes = {
6+
// Assets
67
'/assets/accent-icons/': 'assets-icons--docs#accent-icon-list',
78
'/assets/applet-icons/': 'assets-icons--docs#applet-icon-list',
89
'/assets/system-icons/': 'assets-icons--docs#system-icon-list',
10+
// Components
911
'/components/buttons/action-bar/': 'components-buttons-action-bar--docs',
1012
'/components/buttons/button/': 'components-buttons--docs',
1113
'/components/buttons/segmented-control/': 'preview-segmented-control--docs',
@@ -41,39 +43,42 @@ const routes = {
4143
'/components/text/subtext/': 'components-text-subtext--docs',
4244
'/components/text/text/': 'components-text-text--docs',
4345
'/components/text/title/': 'components-text-title--docs',
44-
'/examples/layout/': 'examples-layouts--docs',
46+
// Get Started
4547
'/get-started/for-developers/theming/overview/': 'features-theming-overview--docs',
46-
'/getting-started/for-developers/contributing/': 'guides-contributing--docs',
48+
'/get-started/for-contributors/code/': 'guides-contributing--docs',
4749
'/get-started/for-developers/guides/combobox/': 'features-combobox--docs',
48-
'/getting-started/for-developers/resources/api-pattern-guidelines/':
50+
'/get-started/for-developers/documentation/api-pattern-guidelines/':
4951
'guides-api-pattern-guidelines--docs',
50-
'/getting-started/for-developers/resources/collection-api/': 'features-collections--docs',
51-
'/getting-started/for-developers/resources/compound-components/':
52+
'/get-started/for-developers/guides/collection-api/': 'features-collections--docs',
53+
'/get-started/for-developers/documentation/compound-components/':
5254
'guides-compound-components--docs',
53-
'/getting-started/for-developers/resources/creating-compound-components/':
55+
'/get-started/for-developers/documentation/creating-compound-components/':
5456
'guides-creating-compound-components--docs',
55-
'/getting-started/for-developers/resources/responsive-styling/':
57+
'/get-started/for-developers/guides/responsive-styling/':
5658
'features-responsive-styling--responsive-container',
57-
'/getting-started/for-developers/resources/style-props/': 'features-style-props--docs',
58-
'/getting-started/for-developers/resources/testing/': 'guides-testing--docs',
59-
'/getting-started/introduction/': 'guides-getting-started--docs',
60-
'/help/upgrade-guides/canvas-v14-upgrade-guide/': 'guides-upgrade-guides-v14-0-overview--docs',
61-
'/help/upgrade-guides/canvas-v14-upgrade-guide/#tab=visual-changes':
62-
'guides-upgrade-guides-v14-0-visual-changes--docs',
59+
'/get-started/for-developers/documentation/style-props/': 'features-style-props--docs',
60+
'/get-started/for-developers/documentation/testing/': 'guides-testing--docs',
61+
'/get-started/for-developers/documentation/testing#visual-tests':
62+
'hooks-and-utilities-testing--docs',
63+
'/get-started/introduction/': 'guides-getting-started--docs',
64+
// Tokens
6365
'/tokens/color/': 'tokens-tokens--docs#colors',
6466
'/tokens/depth/': 'tokens-tokens--docs#depth',
6567
'/tokens/space/': 'tokens-tokens--docs#space',
6668
'/tokens/type/': 'tokens-tokens--docs#type',
67-
'/utilities/testing/': 'hooks-and-utilities-testing--docs',
68-
'/whats-new/upgrade-guides/canvas-kit-v4-upgrade-guide/': 'guides-upgrade-guides-v4-0--docs',
69-
'/whats-new/upgrade-guides/canvas-kit-v5-upgrade-guide/': 'guides-upgrade-guides-v5-0--docs',
70-
'/whats-new/upgrade-guides/canvas-kit-v6-upgrade-guide/': 'guides-upgrade-guides-v6-0--docs',
71-
'/whats-new/upgrade-guides/canvas-kit-v7-upgrade-guide/': 'guides-upgrade-guides-v7-0--docs',
72-
'/whats-new/upgrade-guides/canvas-kit-v8-upgrade-guide/': 'guides-upgrade-guides-v8-0--docs',
73-
'/whats-new/upgrade-guides/canvas-v9-upgrade-guide/': 'guides-upgrade-guides-v9-0--docs',
74-
'/whats-new/upgrade-guides/canvas-v10-upgrade-guide/': 'guides-upgrade-guides-v10-0--docs',
75-
'/whats-new/upgrade-guides/canvas-v11-upgrade-guide/': 'guides-upgrade-guides-v11-0--docs',
76-
'/whats-new/upgrade-guides/canvas-v12-upgrade-guide/': 'guides-upgrade-guides-v12-0--docs',
69+
// Upgrade Guides
70+
'/help/upgrade-guides/canvas-kit-v4-upgrade-guide/': 'guides-upgrade-guides-v4-0--docs',
71+
'/help/upgrade-guides/canvas-kit-v5-upgrade-guide/': 'guides-upgrade-guides-v5-0--docs',
72+
'/help/upgrade-guides/canvas-kit-v6-upgrade-guide/': 'guides-upgrade-guides-v6-0--docs',
73+
'/help/upgrade-guides/canvas-kit-v7-upgrade-guide/': 'guides-upgrade-guides-v7-0--docs',
74+
'/help/upgrade-guides/canvas-kit-v8-upgrade-guide/': 'guides-upgrade-guides-v8-0--docs',
75+
'/help/upgrade-guides/canvas-v9-upgrade-guide/': 'guides-upgrade-guides-v9-0--docs',
76+
'/help/upgrade-guides/canvas-v10-upgrade-guide/': 'guides-upgrade-guides-v10-0--docs',
77+
'/help/upgrade-guides/canvas-v11-upgrade-guide/': 'guides-upgrade-guides-v11-0--docs',
78+
'/help/upgrade-guides/canvas-v12-upgrade-guide/': 'guides-upgrade-guides-v12-0--docs',
79+
'/help/upgrade-guides/canvas-v14-upgrade-guide/': 'guides-upgrade-guides-v14-0-overview--docs',
80+
'/help/upgrade-guides/canvas-v14-upgrade-guide/#tab=visual-changes':
81+
'guides-upgrade-guides-v14-0-visual-changes--docs',
7782
};
7883

7984
export default routes;

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [v14.2.4](https://github.com/Workday/canvas-kit/releases/tag/v14.2.4) (2026-01-07)
7+
8+
### Components
9+
10+
- fix: Add missing heading component and update to remove aria labels on toggle button ([#3655](https://github.com/Workday/canvas-kit/pull/3655)) ([@williamjstanton](https://github.com/williamjstanton), William Stanton, manuel.carrera)
11+
- fix: Select should close on blur ([#3674](https://github.com/Workday/canvas-kit/pull/3674)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera)
12+
13+
### Documentation
14+
15+
- docs: Fixed Box style props links ([#3672](https://github.com/Workday/canvas-kit/pull/3672)) ([@josh-bagwell](https://github.com/josh-bagwell))
16+
Updates style props links in the `Box` component documentation.
17+
18+
19+
## [v13.2.50](https://github.com/Workday/canvas-kit/releases/tag/v13.2.50) (2026-01-06)
20+
21+
### Components
22+
23+
- fix: Select should close on blur ([#3674](https://github.com/Workday/canvas-kit/pull/3674)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera)
24+
25+
26+
## [v13.2.49](https://github.com/Workday/canvas-kit/releases/tag/v13.2.49) (2026-01-06)
27+
28+
### Documentation
29+
30+
- docs: Fixed Box style props links ([#3672](https://github.com/Workday/canvas-kit/pull/3672)) ([@josh-bagwell](https://github.com/josh-bagwell))
31+
Updates style props links in the `Box` component documentation.
32+
## [v14.2.3](https://github.com/Workday/canvas-kit/releases/tag/v14.2.3) (2026-01-02)
33+
34+
### Documentation
35+
36+
- docs: Fix broken docs links ([#3667](https://github.com/Workday/canvas-kit/pull/3667)) ([@alanbsmith](https://github.com/alanbsmith), [@jamesfan](https://github.com/jamesfan), Alan Smith)
37+
38+
639
## [v14.2.2](https://github.com/Workday/canvas-kit/releases/tag/v14.2.2) (2025-12-31)
740

841
### Documentation

cypress/component/Avatar.spec.tsx

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,20 @@
1-
import {Basic} from '../../modules/react/avatar/stories/avatar/examples/Basic';
2-
import {Button} from '../../modules/react/avatar/stories/avatar/examples/Button';
3-
import {CustomStyles} from '../../modules/react/avatar/stories/avatar/examples/CustomStyles';
4-
import {Image} from '../../modules/react/avatar/stories/avatar/examples/Image';
5-
import {LazyLoad} from '../../modules/react/avatar/stories/avatar/examples/LazyLoad';
6-
import {ObjectFit} from '../../modules/react/avatar/stories/avatar/examples/ObjectFit';
7-
import {Size} from '../../modules/react/avatar/stories/avatar/examples/Size';
8-
import {Variant} from '../../modules/react/avatar/stories/avatar/examples/Variant';
1+
import {Image} from '../../modules/react/avatar/stories/examples/Image';
92

103
describe('Avatar', () => {
11-
[Basic, Size, Variant, CustomStyles].forEach(Example => {
12-
context(`${Example.name} Example`, () => {
13-
beforeEach(() => {
14-
cy.mount(<Example />);
15-
});
16-
17-
it('should not have any axe errors', () => {
18-
cy.checkA11y();
19-
});
4+
context(`Image Example`, () => {
5+
beforeEach(() => {
6+
cy.mount(<Image />);
207
});
21-
});
22-
23-
[Image, Button, LazyLoad, ObjectFit].forEach(Example => {
24-
context(`${Example.name} Example`, () => {
25-
beforeEach(() => {
26-
cy.mount(<Example />);
27-
});
288

29-
it('should not have any axe errors', () => {
30-
cy.checkA11y();
31-
});
32-
33-
it('should have images', () => {
34-
cy.get('img').should('be.visible'); // wait for image to load
35-
});
9+
it('should not have any axe errors', () => {
10+
cy.checkA11y();
11+
});
12+
it('should show the initials HD given the name is Happy Doggo until the image is loaded ', () => {
13+
cy.findByText('HD').should('be.visible');
14+
cy.findByRole('img').should('not.exist');
15+
// wait for the image to load
16+
cy.wait(1000);
17+
cy.findByRole('img').should('exist');
3618
});
3719
});
3820
});

cypress/component/AvatarPreview.spec.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.

cypress/component/SidePanelLabs.spec.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ describe('Side Panel', () => {
2828
cy.findByRole('button', {name}).should('exist');
2929
});
3030

31-
it(`should have an aria-expanded attribute of 'true'`, () => {
32-
cy.findByRole('button', {name}).should('have.attr', 'aria-expanded', 'true');
31+
it(`should have an aria-pressed attribute of 'false'`, () => {
32+
cy.findByRole('button', {name}).should('have.attr', 'aria-pressed', 'false');
3333
});
3434

3535
it(`should have an aria-controls attribute equal to the id of the panel`, () => {
@@ -50,8 +50,8 @@ describe('Side Panel', () => {
5050
});
5151

5252
context('the button', () => {
53-
it(`should have an aria-expanded attribute of 'false'`, () => {
54-
cy.findByRole('button', {name}).should('have.attr', 'aria-expanded', 'false');
53+
it(`should have an aria-pressed attribute of 'false'`, () => {
54+
cy.findByRole('button', {name}).should('have.attr', 'aria-pressed', 'false');
5555
});
5656
});
5757
});
@@ -62,7 +62,7 @@ describe('Side Panel', () => {
6262
context(`when focused on a focusable element preceding the Side Panel`, () => {
6363
beforeEach(() => {
6464
cy.mount(<FirstFocusable />);
65-
cy.findByLabelText('Avatar').focus();
65+
cy.findByRole('button', {name: 'Open'}).focus();
6666
});
6767

6868
context('when the tab key is pressed once', () => {

cypress/component/SidePanelPreview.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('Side Panel', () => {
6262
context(`when focused on a focusable element preceding the Side Panel`, () => {
6363
beforeEach(() => {
6464
cy.mount(<FirstFocusable />);
65-
cy.findByLabelText('Avatar').focus();
65+
cy.findByRole('button', {name: 'Open'}).focus();
6666
});
6767

6868
context('when the tab key is pressed once', () => {

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"modules/**"
44
],
5-
"version": "14.2.2",
5+
"version": "14.2.4",
66
"npmClient": "yarn",
77
"command": {
88
"version": {

modules/codemod/lib/v15/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
import {Transform} from 'jscodeshift';
22

3+
import promoteAvatar from './promoteAvatar';
34
import promoteInformationHighlight from './promoteInformationHighlight';
45
import promotePill from './promotePill';
56
import promoteSegmentedControl from './promoteSegmentedControl';
67

78
const transform: Transform = (file, api, options) => {
89
// These will run in order. If your transform depends on others, place yours after dependent transforms
9-
const fixes: Transform[] = [promoteSegmentedControl, promoteInformationHighlight, promotePill];
10+
const fixes: Transform[] = [
11+
promoteSegmentedControl,
12+
promoteInformationHighlight,
13+
promotePill,
14+
promoteAvatar,
15+
];
1016
return fixes.reduce((source, fix) => fix({...file, source}, api, options) as string, file.source);
1117
};
1218

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import {ASTPath, ImportDeclaration, Transform} from 'jscodeshift';
2+
3+
type SpecifierType = {importedName: string; name?: string};
4+
5+
// List of all Avatar-related exports from preview that should be promoted
6+
const AVATAR_EXPORTS = [
7+
'Avatar',
8+
'AvatarProps',
9+
'avatarStencil',
10+
'AvatarImage',
11+
'AvatarImageProps',
12+
'avatarImageStencil',
13+
'AvatarName',
14+
'AvatarNameProps',
15+
'avatarNameStencil',
16+
'BaseAvatar',
17+
'BaseAvatarProps',
18+
'baseAvatarStencil',
19+
'getInitialsFromName',
20+
];
21+
22+
const transform: Transform = (file, api) => {
23+
const j = api.jscodeshift;
24+
25+
const root = j(file.source);
26+
const avatarSpecifiers: SpecifierType[] = [];
27+
const foundImport: ASTPath<ImportDeclaration>[] = [];
28+
29+
root
30+
.find(j.ImportDeclaration, {
31+
source: {value: (value: string) => value.includes('@workday/canvas-kit-preview-react')},
32+
})
33+
.forEach(nodePath => {
34+
nodePath.value.specifiers = nodePath.value.specifiers?.filter(specifier => {
35+
if (
36+
specifier.type === 'ImportSpecifier' &&
37+
specifier.local &&
38+
AVATAR_EXPORTS.includes(specifier.imported.name)
39+
) {
40+
avatarSpecifiers.push({
41+
importedName: specifier.imported.name,
42+
name: specifier.local.name,
43+
});
44+
45+
return false;
46+
}
47+
return true;
48+
});
49+
50+
if (avatarSpecifiers.length) {
51+
foundImport.push(nodePath);
52+
}
53+
});
54+
55+
const existingAvatarImports = root.find(j.ImportDeclaration, {
56+
source: {value: '@workday/canvas-kit-react/avatar'},
57+
});
58+
59+
const mapToSpecifiers = (specifier: SpecifierType) => {
60+
return j.importSpecifier(
61+
j.identifier(specifier.importedName),
62+
specifier.name ? j.identifier(specifier.name) : undefined
63+
);
64+
};
65+
66+
// add to existing import
67+
if (existingAvatarImports.length) {
68+
existingAvatarImports.forEach(nodePath => {
69+
nodePath.value.specifiers = nodePath.value.specifiers?.concat(
70+
avatarSpecifiers.map(mapToSpecifiers)
71+
);
72+
});
73+
} else {
74+
// create new import
75+
if (foundImport.length) {
76+
foundImport[0].insertBefore(
77+
j.importDeclaration(
78+
avatarSpecifiers.map(mapToSpecifiers),
79+
j.stringLiteral('@workday/canvas-kit-react/avatar')
80+
)
81+
);
82+
}
83+
}
84+
85+
foundImport.forEach(importPath => {
86+
if (
87+
!importPath.value.specifiers?.length ||
88+
importPath.value.source.value === '@workday/canvas-kit-preview-react/avatar'
89+
) {
90+
importPath.prune();
91+
}
92+
});
93+
94+
return root.toSource();
95+
};
96+
97+
export default transform;

0 commit comments

Comments
 (0)