From f671fde0930b77ca0a42ad7ba1452f4330ae6e1d Mon Sep 17 00:00:00 2001 From: Nicholas Boll Date: Mon, 29 Jul 2024 10:58:09 -0600 Subject: [PATCH 01/26] fix: Support marginTop and marginBottom on ListBox (#2844) Adds correct support for `marginTop` and `marginBottom` on `ListBox` and `Menu.List` components. [category:Components] --- modules/react/collection/lib/ListBox.tsx | 57 ++++++++++++++++-------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/modules/react/collection/lib/ListBox.tsx b/modules/react/collection/lib/ListBox.tsx index abf458e4d0..8f953d6b2a 100644 --- a/modules/react/collection/lib/ListBox.tsx +++ b/modules/react/collection/lib/ListBox.tsx @@ -5,7 +5,7 @@ import { createSubcomponent, ExtractProps, } from '@workday/canvas-kit-react/common'; -import {Box, Flex} from '@workday/canvas-kit-react/layout'; +import {Box, Flex, FlexProps} from '@workday/canvas-kit-react/layout'; import {useListModel} from './useListModel'; import {useListRenderItems} from './useListRenderItem'; @@ -13,6 +13,24 @@ import {useListItemRegister} from './useListItemRegister'; export interface ListBoxProps extends Omit, 'children'> { children?: React.ReactNode | ((item: T, index: number) => React.ReactNode); + /** + * Set the margin top of the list box. You must use this prop and not style any other way. The + * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure + * proper rendering. If a `marginTop` is not provided, the value falls back to `marginY`. + */ + marginTop?: FlexProps['marginTop']; + /** + * Set the margin bottom of the list box. You must use this prop and not style any other way. The + * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure + * proper rendering. If a `marginBottom` is not provided, the value falls back to `marginY`. + */ + marginBottom?: FlexProps['marginBottom']; + /** + * Set the margin top and bottom of the list box. You must use this prop and not style any other way. The + * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure + * proper rendering. + */ + marginY?: FlexProps['marginY']; } export const ListBoxItem = createSubcomponent('li')({ @@ -65,21 +83,24 @@ export const ListBox = createContainer('ul')({ */ Item: ListBoxItem, }, -})(({height, maxHeight, marginY, ...elemProps}, Element, model) => { - // We're moving `marginY` to the container to not interfere with the virtualization size. We set - // the `marginY` on the Flex to `0` to avoid inaccurate scrollbars +})( + ({height, maxHeight, marginTop, marginBottom, marginY, ...elemProps}, Element, model) => { + // We're moving `marginY` to the container to not interfere with the virtualization size. We set + // the `marginY` on the Flex to `0` to avoid inaccurate scrollbars - // TODO figure out what style props should go to which `Box` - return ( - - - {useListRenderItems(model, elemProps.children)} - - - ); -}); + // TODO figure out what style props should go to which `Box` + return ( + + + {useListRenderItems(model, elemProps.children)} + + + ); + } +); From ffada361c9cc009488b6860940c7415dfbacba94 Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Mon, 29 Jul 2024 16:58:55 +0000 Subject: [PATCH 02/26] chore: Release v10.3.49 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 11 files changed, 28 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3449de802b..706f030179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v10.3.49](https://github.com/Workday/canvas-kit/releases/tag/v10.3.49) (2024-07-29) + +### Components + +- fix: Support marginTop and marginBottom on ListBox ([#2844](https://github.com/Workday/canvas-kit/pull/2844)) ([@NicholasBoll](https://github.com/NicholasBoll)) + + ## [v10.3.48](https://github.com/Workday/canvas-kit/releases/tag/v10.3.48) (2024-07-24) ### Documentation diff --git a/lerna.json b/lerna.json index 6d8cd4a49d..948de85fac 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "10.3.48", + "version": "10.3.49", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 4a63b11b09..1c9eae7ac3 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "10.3.48", + "version": "10.3.49", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/docs/package.json b/modules/docs/package.json index e2255c63d0..9ebd6633b1 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "10.3.48", + "version": "10.3.49", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^10.3.48", - "@workday/canvas-kit-preview-react": "^10.3.48", - "@workday/canvas-kit-react": "^10.3.48", - "@workday/canvas-kit-styling": "^10.3.48", + "@workday/canvas-kit-labs-react": "^10.3.49", + "@workday/canvas-kit-preview-react": "^10.3.49", + "@workday/canvas-kit-react": "^10.3.49", + "@workday/canvas-kit-styling": "^10.3.49", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "markdown-to-jsx": "^6.10.3", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 935edd59b4..61e7c5bfca 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "10.3.48", + "version": "10.3.49", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.48", + "@workday/canvas-kit-react": "^10.3.49", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 8d76c60fb5..4664d49008 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "10.3.48", + "version": "10.3.49", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 06c38909a8..73e0a806b5 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "10.3.48", + "version": "10.3.49", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -47,8 +47,8 @@ "@emotion/is-prop-valid": "^1.1.1", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.48", - "@workday/canvas-kit-styling": "^10.3.48", + "@workday/canvas-kit-react": "^10.3.49", + "@workday/canvas-kit-styling": "^10.3.49", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 9c240b42eb..7cbb79ed09 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "10.3.48", + "version": "10.3.49", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 3db70c48bd..77a677cc77 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "10.3.48", + "version": "10.3.49", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^10.3.48", - "@workday/canvas-kit-styling": "^10.3.48", + "@workday/canvas-kit-popup-stack": "^10.3.49", + "@workday/canvas-kit-styling": "^10.3.49", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index eb456a3c30..c120596f44 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "10.3.48", + "version": "10.3.49", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^10.3.48", + "@workday/canvas-kit-styling": "^10.3.49", "stylis": "4.0.13", "typescript": "4.2" }, diff --git a/modules/styling/package.json b/modules/styling/package.json index 0a57948c7a..25004961ea 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "10.3.48", + "version": "10.3.49", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.48", + "@workday/canvas-kit-react": "^10.3.49", "@workday/canvas-tokens-web": "^1.0.0", "typescript": "4.2" } From 2027105351c4ed414b372c25e50cdd969d24187b Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Tue, 30 Jul 2024 14:58:15 +0000 Subject: [PATCH 03/26] chore: Release v11.0.23 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 6 +++--- 14 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48bf1a62aa..ade2597265 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.0.23](https://github.com/Workday/canvas-kit/releases/tag/v11.0.23) (2024-07-30) + +### Components + +- fix: Support marginTop and marginBottom on ListBox ([#2844](https://github.com/Workday/canvas-kit/pull/2844)) ([@NicholasBoll](https://github.com/NicholasBoll)) + + ## [v10.3.49](https://github.com/Workday/canvas-kit/releases/tag/v10.3.49) (2024-07-29) ### Components diff --git a/lerna.json b/lerna.json index bc2c8d32c4..3b385cef31 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.0.22", + "version": "11.0.23", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 733a04f564..de3b3839be 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.0.22", + "version": "11.0.23", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 5074d45e51..5c5068aecb 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.0.22", + "version": "11.0.23", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 2b024702bb..479d75b7e6 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.0.22", + "version": "11.0.23", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.0.22", - "@workday/canvas-kit-preview-react": "^11.0.22", - "@workday/canvas-kit-react": "^11.0.22", - "@workday/canvas-kit-styling": "^11.0.22", + "@workday/canvas-kit-labs-react": "^11.0.23", + "@workday/canvas-kit-preview-react": "^11.0.23", + "@workday/canvas-kit-react": "^11.0.23", + "@workday/canvas-kit-styling": "^11.0.23", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 5bc11ead54..94c42257d0 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.0.22", + "version": "11.0.23", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 1665482e40..875632d2c1 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.0.22", + "version": "11.0.23", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.22", + "@workday/canvas-kit-react": "^11.0.23", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 16c82bf1c0..6878ef9de8 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.0.22", + "version": "11.0.23", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index 188e6c8cb8..bc9f243d01 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.0.22", + "version": "11.0.23", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 8f73a47961..6136a69a24 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.0.22", + "version": "11.0.23", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.22", - "@workday/canvas-kit-styling": "^11.0.22", + "@workday/canvas-kit-react": "^11.0.23", + "@workday/canvas-kit-styling": "^11.0.23", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 1b14e6cfc0..cda0fe0820 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.0.22", + "version": "11.0.23", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 474d668d4a..b2a0e45c30 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.0.22", + "version": "11.0.23", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.0.22", - "@workday/canvas-kit-styling": "^11.0.22", + "@workday/canvas-kit-popup-stack": "^11.0.23", + "@workday/canvas-kit-styling": "^11.0.23", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index f52df50755..073fabd1a9 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.0.22", + "version": "11.0.23", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.0.22", + "@workday/canvas-kit-styling": "^11.0.23", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index ab6d095aea..3c8a3f7132 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.0.22", + "version": "11.0.23", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,9 +53,9 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.22", - "@workday/canvas-tokens-web": "^2.0.0", + "@workday/canvas-kit-react": "^11.0.23", "@workday/canvas-system-icons-web": "^3.0.0", + "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" } } From 55a9d182b875481dd5ddd0afc2a85b22978e2e9a Mon Sep 17 00:00:00 2001 From: Nicholas Boll Date: Mon, 5 Aug 2024 10:17:38 -0600 Subject: [PATCH 04/26] fix(combobox): Use correct state for aria-selected (#2849) Fixes 2860. `aria-selected` for combobox menu items. The cursor was used to determine `aria-selected` instead of the selected item. This changes the visuals of the selected vs focus state, but that issue is covered in #2828. [category:Components] Release Note: This change fixes `aria-selected` in `Combobox.Menu.Item` components, but this does change the visuals of what is considered "selected". If you have any visual tests that have a screenshot of a selected state, the visual regression will have to be updated. The same is true for DOM-based snapshot tests. `aria-selected="true"` will now be added when an item is selected and not just when the virtual cursor is on the item. If your snapshot captures this DOM state, the snapshot will have to be updated. --- cypress/integration/Autocomplete.spec.ts | 60 ++++++-- cypress/integration/Select.spec.ts | 130 ++++++++++++------ .../react/combobox/lib/ComboboxMenuItem.tsx | 2 +- 3 files changed, 134 insertions(+), 58 deletions(-) diff --git a/cypress/integration/Autocomplete.spec.ts b/cypress/integration/Autocomplete.spec.ts index 9f56743dbd..b611e16885 100644 --- a/cypress/integration/Autocomplete.spec.ts +++ b/cypress/integration/Autocomplete.spec.ts @@ -67,6 +67,10 @@ describe('Autocomplete', () => { cy.findByRole('combobox').should('not.have.attr', 'aria-activedescendant'); }); + it('should not have visual focus on any element', () => { + cy.get('[role="option"].focus').should('not.exist'); + }); + it('should not have aria-selected=true on any elements', () => { cy.get('[aria-selected=true]').should('not.exist'); }); @@ -81,12 +85,16 @@ describe('Autocomplete', () => { cy.findAllByRole('combobox').should('not.have.attr', 'aria-activedescendant'); }); + it('should not have visual focus on the first item', () => { + cy.findAllByRole('option').eq(0).should('not.have.class', 'focus'); + }); + it('should not set aria-selected to the first option', () => { cy.findAllByRole('option').eq(0).should('have.not.attr', 'aria-selected'); }); }); - context('when a value is entered', () => { + context('when "Red" is typed', () => { beforeEach(() => { cy.findByRole('combobox').type('Red', {delay: 1}); waitForAutocompleteReady(); @@ -139,8 +147,8 @@ describe('Autocomplete', () => { ); }); - it('should set aria-selected to the first option', () => { - cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + it('should set visual focus to the first option', () => { + cy.findAllByRole('option').eq(0).should('have.class', 'focus'); }); context('when the user presses the enter key', () => { @@ -156,7 +164,7 @@ describe('Autocomplete', () => { cy.findByRole('listbox').should('not.exist'); }); - context('when the use hits the "2" key', () => { + context('when the user hits the "2" key', () => { beforeEach(() => { cy.findAllByRole('combobox').type('2'); waitForAutocompleteReady(); @@ -173,6 +181,10 @@ describe('Autocomplete', () => { it.skip('should change the filtered results', () => { cy.findByRole('option', {name: 'Red Apple 121'}).should('be.visible'); }); + + it('should set aria-selected to the first option', () => { + cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + }); }); }); @@ -230,8 +242,12 @@ describe('Autocomplete', () => { ); }); - it('should set aria-selected to the second option', () => { - cy.findAllByRole('option').eq(1).should('have.attr', 'aria-selected', 'true'); + it('should set visual focus on the second option', () => { + cy.findAllByRole('option').eq(1).should('have.class', 'focus'); + }); + + it('should not have aria-selected=true on any elements', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -253,8 +269,12 @@ describe('Autocomplete', () => { ); }); - it('should set aria-selected to the first option', () => { - cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + it('should set visual focus on the first option', () => { + cy.findAllByRole('option').eq(0).should('have.class', 'focus'); + }); + + it('should not have aria-selected=true on any elements', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -269,8 +289,12 @@ describe('Autocomplete', () => { ); }); - it('should set aria-selected to the last option', () => { - cy.findAllByRole('option').eq(3).should('have.attr', 'aria-selected', 'true'); + it('should set visual focus on the last option', () => { + cy.findAllByRole('option').eq(3).should('have.class', 'focus'); + }); + + it('should not have aria-selected=true on any elements', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -285,8 +309,12 @@ describe('Autocomplete', () => { ); }); - it('should set aria-selected to the third option', () => { - cy.findAllByRole('option').eq(2).should('have.attr', 'aria-selected', 'true'); + it('should set visual focus on the third option', () => { + cy.findAllByRole('option').eq(2).should('have.class', 'focus'); + }); + + it('should not have aria-selected=true on any elements', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -300,8 +328,12 @@ describe('Autocomplete', () => { ); }); - it('should set aria-selected to the first option', () => { - cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + it('should set visual focus on the first option', () => { + cy.findAllByRole('option').eq(0).should('have.class', 'focus'); + }); + + it('should not have aria-selected=true on any elements', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); diff --git a/cypress/integration/Select.spec.ts b/cypress/integration/Select.spec.ts index e9a6ec2459..b8f761441c 100644 --- a/cypress/integration/Select.spec.ts +++ b/cypress/integration/Select.spec.ts @@ -115,11 +115,11 @@ describe('Select', () => { context('the menu', () => { it('should scroll so that the "San Francisco (United States)" option is fully visible', () => { - cy.findByText('San Francisco (United States)').should( - 'have.attr', - 'aria-selected', - 'true' - ); + cy.findByText('San Francisco (United States)').should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -132,11 +132,11 @@ describe('Select', () => { context('the menu', () => { it('should scroll so that the "San Mateo (United States)" option is fully visible', () => { - cy.findByText('San Mateo (United States)').should( - 'have.attr', - 'aria-selected', - 'true' - ); + cy.findByText('San Mateo (United States)').should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -149,11 +149,11 @@ describe('Select', () => { context('the menu', () => { it('should scroll so that the "Dallas (United States)" option is fully visible', () => { - cy.findByText('Dallas (United States)').should( - 'have.attr', - 'aria-selected', - 'true' - ); + cy.findByText('Dallas (United States)').should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -170,11 +170,11 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the "San Francisco (United States)" option', () => { - cy.findByText('San Francisco (United States)').should( - 'have.attr', - 'aria-selected', - 'true' - ); + cy.findByText('San Francisco (United States)').should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -186,11 +186,11 @@ describe('Select', () => { context('the select input', () => { it('should set assistive focus to the "San Francisco (United States)" option', () => { - cy.findByText('San Francisco (United States)').should( - 'have.attr', - 'aria-selected', - 'true' - ); + cy.findByText('San Francisco (United States)').should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -203,11 +203,11 @@ describe('Select', () => { context('the select input', () => { it('should set assistive focus to the "San Mateo (United States)" option', () => { - cy.findByText('San Mateo (United States)').should( - 'have.attr', - 'aria-selected', - 'true' - ); + cy.findByText('San Mateo (United States)').should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -231,6 +231,10 @@ describe('Select', () => { 'true' ); }); + + it('should set assistive focus to the "Dallas (United States)" option', () => { + cy.findByText('Dallas (United States)').should('have.class', 'focus'); + }); }); }); } @@ -266,7 +270,11 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the first option ("E-mail")', () => { - cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + cy.findAllByRole('option').eq(0).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -277,7 +285,11 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the second option ("Phone")', () => { - cy.findAllByRole('option').eq(1).should('have.attr', 'aria-selected', 'true'); + cy.findAllByRole('option').eq(1).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -292,6 +304,10 @@ describe('Select', () => { cy.findByRole('combobox').should('not.have.attr', 'aria-activedescendant'); }); + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); + }); + context('when the menu is re-opened AFTER it has fully closed', () => { beforeEach(() => { // Wait for menu to fully close before we open it again (so we @@ -303,7 +319,11 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the second option ("Phone") that is where the cursor was', () => { - cy.findAllByRole('option').eq(1).should('have.attr', 'aria-selected', 'true'); + cy.findByRole('option', {name: 'Phone'}).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -336,7 +356,11 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to second enabled option ("Phone")', () => { - cy.findAllByRole('option').eq(1).should('have.attr', 'aria-selected', 'true'); + cy.findAllByRole('option').eq(1).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -347,7 +371,11 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the fourth option down ("Mail") since focus will have skipped one disabled option ("Fax")', () => { - cy.findAllByRole('option').eq(3).should('have.attr', 'aria-selected', 'true'); + cy.findByRole('option', {name: 'Mail'}).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); @@ -409,9 +437,13 @@ describe('Select', () => { }); context('when Boulder is reached via the arrow key', () => { it('should show Boulder (United States)', () => { - cy.findByText('Boulder (United States)').should('have.attr', 'aria-selected', 'true'); + cy.findByText('Boulder (United States)').should('have.class', 'focus'); cy.findByText('Boulder (United States)').should('be.visible'); }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); + }); }); }); }); @@ -461,8 +493,12 @@ describe('Select', () => { }); context('the first option ("E-Mail")', () => { - it('should have an aria-selected attribute set to "true"', () => { - cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + it('should set accessible focus on the "E-Mail" option', () => { + cy.findAllByRole('option').eq(0).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); @@ -495,6 +531,10 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the "Phone" option', () => { + cy.findByText('Phone').should('have.class', 'focus'); + }); + + it('should set assistive selection on the "Phone" option', () => { cy.findByText('Phone').should('have.attr', 'aria-selected', 'true'); }); }); @@ -526,7 +566,7 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the "Phone" option', () => { - cy.findAllByRole('option').eq(1).should('have.attr', 'aria-selected', 'true'); + cy.findByRole('option', {name: 'Phone'}).should('have.class', 'focus'); }); }); @@ -537,14 +577,18 @@ describe('Select', () => { context('the menu', () => { it('should set assistive focus to the "Mail" option and skip disabled fax', () => { - cy.findAllByRole('option').eq(3).should('have.attr', 'aria-selected', 'true'); + cy.findByRole('option', {name: 'Mail'}).should('have.class', 'focus'); + }); + + it('should not have any item selected', () => { + cy.get('[aria-selected=true]').should('not.exist'); }); }); }); }); }); - context('when the enter key is pressed', () => { + context('when the down arrow key is pressed', () => { beforeEach(() => { cy.findByRole('combobox').focus().realType('{downarrow}'); }); @@ -554,8 +598,8 @@ describe('Select', () => { cy.findByRole('listbox').should('be.visible'); }); - it('should have E-Mail selected', () => { - cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true'); + it('should set accessible focus on the "E-Mail" option', () => { + cy.findAllByRole('option').eq(0).should('have.class', 'focus'); }); }); diff --git a/modules/react/combobox/lib/ComboboxMenuItem.tsx b/modules/react/combobox/lib/ComboboxMenuItem.tsx index ce38056470..9717627dd2 100644 --- a/modules/react/combobox/lib/ComboboxMenuItem.tsx +++ b/modules/react/combobox/lib/ComboboxMenuItem.tsx @@ -44,7 +44,7 @@ export const useComboboxMenuItem = composeHooks( event.preventDefault(); }; - const selected = model.state.cursorId === id; + const selected = model.state.selectedIds[0] === id; return { role: 'option', From 419f977a18c6952dca36a9490b4eb2c3de9d1309 Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Mon, 5 Aug 2024 16:18:15 +0000 Subject: [PATCH 05/26] chore: Release v10.3.50 [skip release] --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 11 files changed, 29 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 706f030179..84e162de1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v10.3.50](https://github.com/Workday/canvas-kit/releases/tag/v10.3.50) (2024-08-05) + +### Components + +- fix(combobox): Use correct state for aria-selected ([#2849](https://github.com/Workday/canvas-kit/pull/2849)) ([@NicholasBoll](https://github.com/NicholasBoll)) + This change fixes `aria-selected` in `Combobox.Menu.Item` components, but this does change the visuals of what is considered "selected". If you have any visual tests that have a screenshot of a selected state, the visual regression will have to be updated. The same is true for DOM-based snapshot tests. `aria-selected="true"` will now be added when an item is selected and not just when the virtual cursor is on the item. If your snapshot captures this DOM state, the snapshot will have to be updated. + + ## [v10.3.49](https://github.com/Workday/canvas-kit/releases/tag/v10.3.49) (2024-07-29) ### Components diff --git a/lerna.json b/lerna.json index 948de85fac..ddab71363f 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "10.3.49", + "version": "10.3.50", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 1c9eae7ac3..c2733f8882 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "10.3.49", + "version": "10.3.50", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/docs/package.json b/modules/docs/package.json index 9ebd6633b1..a7cd345776 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "10.3.49", + "version": "10.3.50", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^10.3.49", - "@workday/canvas-kit-preview-react": "^10.3.49", - "@workday/canvas-kit-react": "^10.3.49", - "@workday/canvas-kit-styling": "^10.3.49", + "@workday/canvas-kit-labs-react": "^10.3.50", + "@workday/canvas-kit-preview-react": "^10.3.50", + "@workday/canvas-kit-react": "^10.3.50", + "@workday/canvas-kit-styling": "^10.3.50", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "markdown-to-jsx": "^6.10.3", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 61e7c5bfca..dcf2497b1a 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "10.3.49", + "version": "10.3.50", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.49", + "@workday/canvas-kit-react": "^10.3.50", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 4664d49008..27cd3a5601 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "10.3.49", + "version": "10.3.50", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 73e0a806b5..5e0c83756c 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "10.3.49", + "version": "10.3.50", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -47,8 +47,8 @@ "@emotion/is-prop-valid": "^1.1.1", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.49", - "@workday/canvas-kit-styling": "^10.3.49", + "@workday/canvas-kit-react": "^10.3.50", + "@workday/canvas-kit-styling": "^10.3.50", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 7cbb79ed09..9b022f154b 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "10.3.49", + "version": "10.3.50", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 77a677cc77..f335685e21 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "10.3.49", + "version": "10.3.50", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^10.3.49", - "@workday/canvas-kit-styling": "^10.3.49", + "@workday/canvas-kit-popup-stack": "^10.3.50", + "@workday/canvas-kit-styling": "^10.3.50", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index c120596f44..a99e22edbc 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "10.3.49", + "version": "10.3.50", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^10.3.49", + "@workday/canvas-kit-styling": "^10.3.50", "stylis": "4.0.13", "typescript": "4.2" }, diff --git a/modules/styling/package.json b/modules/styling/package.json index 25004961ea..4a450074bf 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "10.3.49", + "version": "10.3.50", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.49", + "@workday/canvas-kit-react": "^10.3.50", "@workday/canvas-tokens-web": "^1.0.0", "typescript": "4.2" } From 90025dbccbe1a5b8713d83ed143e72655b3e5081 Mon Sep 17 00:00:00 2001 From: Thu Nguyen Date: Mon, 5 Aug 2024 09:19:17 -0700 Subject: [PATCH 06/26] fix(SearchForm): Suppress forwarding props warning (#2850) Fixes: #2458 [category:Components] Co-authored-by: Thu Nguyen --- .../labs-react/search-form/lib/SearchForm.tsx | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/modules/labs-react/search-form/lib/SearchForm.tsx b/modules/labs-react/search-form/lib/SearchForm.tsx index a1b21ae877..441a3f65ab 100644 --- a/modules/labs-react/search-form/lib/SearchForm.tsx +++ b/modules/labs-react/search-form/lib/SearchForm.tsx @@ -178,7 +178,7 @@ const SearchCombobox = styled(Combobox)({ }); const SearchIcon = styled(TertiaryButton, { - shouldForwardProp: filterOutProps(['isHidden']), + shouldForwardProp: filterOutProps(['isHidden', 'isCollapsed']), }) & {isHidden: boolean}>(({isCollapsed, isHidden}) => { return { position: `absolute`, @@ -192,28 +192,30 @@ const SearchIcon = styled(TertiaryButton, { }; }); -const CloseButton = styled(TertiaryButton)< - Pick & Pick ->(({isCollapsed, showForm}) => { - const collapseStyles: CSSObject = - isCollapsed && showForm - ? { - display: 'inline-block', - } - : { - display: 'none', - }; +const CloseButton = styled(TertiaryButton, { + shouldForwardProp: filterOutProps(['isCollapsed', 'showForm']), +}) & Pick>( + ({isCollapsed, showForm}) => { + const collapseStyles: CSSObject = + isCollapsed && showForm + ? { + display: 'inline-block', + } + : { + display: 'none', + }; - return { - position: `absolute`, - top: 0, - bottom: 0, - right: 0, - margin: `auto ${space.xxs}`, - zIndex: 3, - ...collapseStyles, - }; -}); + return { + position: `absolute`, + top: 0, + bottom: 0, + right: 0, + margin: `auto ${space.xxs}`, + zIndex: 3, + ...collapseStyles, + }; + } +); const SearchField = styled(FormField)< Pick & Pick From a13be7434586f13756d61fd6d770b4af1b0d429a Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Mon, 5 Aug 2024 16:20:03 +0000 Subject: [PATCH 07/26] chore: Release v11.0.24 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 14 files changed, 31 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ade2597265..4c133f9b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.0.24](https://github.com/Workday/canvas-kit/releases/tag/v11.0.24) (2024-08-05) + +### Components + +- fix(SearchForm): Suppress forwarding props warning ([#2850](https://github.com/Workday/canvas-kit/pull/2850)) ([@thunguyen19](https://github.com/thunguyen19), Thu Nguyen) + + ## [v11.0.23](https://github.com/Workday/canvas-kit/releases/tag/v11.0.23) (2024-07-30) ### Components diff --git a/lerna.json b/lerna.json index 3b385cef31..20f36f72e1 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.0.23", + "version": "11.0.24", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index de3b3839be..585b01034c 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.0.23", + "version": "11.0.24", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 5c5068aecb..c2a5fdd0f6 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.0.23", + "version": "11.0.24", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 479d75b7e6..11915db6c5 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.0.23", + "version": "11.0.24", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.0.23", - "@workday/canvas-kit-preview-react": "^11.0.23", - "@workday/canvas-kit-react": "^11.0.23", - "@workday/canvas-kit-styling": "^11.0.23", + "@workday/canvas-kit-labs-react": "^11.0.24", + "@workday/canvas-kit-preview-react": "^11.0.24", + "@workday/canvas-kit-react": "^11.0.24", + "@workday/canvas-kit-styling": "^11.0.24", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 94c42257d0..2b221eda79 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.0.23", + "version": "11.0.24", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 875632d2c1..519a676cb5 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.0.23", + "version": "11.0.24", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.23", + "@workday/canvas-kit-react": "^11.0.24", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 6878ef9de8..4f5f1749af 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.0.23", + "version": "11.0.24", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index bc9f243d01..01d189eee5 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.0.23", + "version": "11.0.24", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 6136a69a24..bc67bfb8c1 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.0.23", + "version": "11.0.24", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.23", - "@workday/canvas-kit-styling": "^11.0.23", + "@workday/canvas-kit-react": "^11.0.24", + "@workday/canvas-kit-styling": "^11.0.24", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index cda0fe0820..6aaa9b0192 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.0.23", + "version": "11.0.24", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index b2a0e45c30..cc639d3bb6 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.0.23", + "version": "11.0.24", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.0.23", - "@workday/canvas-kit-styling": "^11.0.23", + "@workday/canvas-kit-popup-stack": "^11.0.24", + "@workday/canvas-kit-styling": "^11.0.24", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index 073fabd1a9..bd89d69b56 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.0.23", + "version": "11.0.24", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.0.23", + "@workday/canvas-kit-styling": "^11.0.24", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index 3c8a3f7132..d8b73f66d8 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.0.23", + "version": "11.0.24", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.23", + "@workday/canvas-kit-react": "^11.0.24", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" From 0da8599052bbf06aaa1f2c881f38589d022eb515 Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Mon, 5 Aug 2024 20:14:54 +0000 Subject: [PATCH 08/26] chore: Release v11.0.25 [skip release] --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 6 +++--- 14 files changed, 33 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f104b5dd7e..43fd9869fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.0.25](https://github.com/Workday/canvas-kit/releases/tag/v11.0.25) (2024-08-05) + +### Components + +- fix(combobox): Use correct state for aria-selected ([#2849](https://github.com/Workday/canvas-kit/pull/2849)) ([@NicholasBoll](https://github.com/NicholasBoll)) + This change fixes `aria-selected` in `Combobox.Menu.Item` components, but this does change the visuals of what is considered "selected". If you have any visual tests that have a screenshot of a selected state, the visual regression will have to be updated. The same is true for DOM-based snapshot tests. `aria-selected="true"` will now be added when an item is selected and not just when the virtual cursor is on the item. If your snapshot captures this DOM state, the snapshot will have to be updated. + + ## [v10.3.50](https://github.com/Workday/canvas-kit/releases/tag/v10.3.50) (2024-08-05) ### Components diff --git a/lerna.json b/lerna.json index 20f36f72e1..3816b2b93d 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.0.24", + "version": "11.0.25", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 585b01034c..41f2499726 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.0.24", + "version": "11.0.25", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index c2a5fdd0f6..0560dafb3d 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.0.24", + "version": "11.0.25", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 11915db6c5..75af070228 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.0.24", + "version": "11.0.25", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.0.24", - "@workday/canvas-kit-preview-react": "^11.0.24", - "@workday/canvas-kit-react": "^11.0.24", - "@workday/canvas-kit-styling": "^11.0.24", + "@workday/canvas-kit-labs-react": "^11.0.25", + "@workday/canvas-kit-preview-react": "^11.0.25", + "@workday/canvas-kit-react": "^11.0.25", + "@workday/canvas-kit-styling": "^11.0.25", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 2b221eda79..663484f146 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.0.24", + "version": "11.0.25", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 519a676cb5..a44ab13e82 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.0.24", + "version": "11.0.25", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.24", + "@workday/canvas-kit-react": "^11.0.25", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 4f5f1749af..e46ff3c6af 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.0.24", + "version": "11.0.25", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index 01d189eee5..16243511e5 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.0.24", + "version": "11.0.25", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index bc67bfb8c1..3a9552807a 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.0.24", + "version": "11.0.25", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.24", - "@workday/canvas-kit-styling": "^11.0.24", + "@workday/canvas-kit-react": "^11.0.25", + "@workday/canvas-kit-styling": "^11.0.25", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 6aaa9b0192..326872e2da 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.0.24", + "version": "11.0.25", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index cc639d3bb6..63eadaffa9 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.0.24", + "version": "11.0.25", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.0.24", - "@workday/canvas-kit-styling": "^11.0.24", + "@workday/canvas-kit-popup-stack": "^11.0.25", + "@workday/canvas-kit-styling": "^11.0.25", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index bd89d69b56..fd70f21b5e 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.0.24", + "version": "11.0.25", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.0.24", + "@workday/canvas-kit-styling": "^11.0.25", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index 904245cc5b..42a843403e 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.0.24", + "version": "11.0.25", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,9 +53,9 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.24", - "@workday/canvas-tokens-web": "^2.0.0", + "@workday/canvas-kit-react": "^11.0.25", "@workday/canvas-system-icons-web": "^3.0.0", + "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" } } From 446262d950b1928d1abbfe4710a645fcb414d2ee Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Mon, 5 Aug 2024 14:28:18 -0600 Subject: [PATCH 09/26] fix: Set aria-modal to false for better accessibility (#2855) Fixes: https://github.com/Workday/canvas-kit/issues/2853 Set `aria-modal` to false to provide better accessibility in Modals that might have a popup like a Select. [category:Accessibility] Co-authored-by: manuel.carrera --- cypress/integration/Modal.spec.ts | 12 ++++++------ modules/react/modal/lib/Modal.tsx | 2 +- modules/react/modal/lib/hooks/useModalCard.ts | 9 ++++++++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/cypress/integration/Modal.spec.ts b/cypress/integration/Modal.spec.ts index cc43f75bbc..5b9c9aca44 100644 --- a/cypress/integration/Modal.spec.ts +++ b/cypress/integration/Modal.spec.ts @@ -69,11 +69,11 @@ describe('Modal', () => { cy.findByRole('dialog', {name: 'MIT License'}).should('have.attr', 'aria-labelledby'); }); - it('should have an aria-modal=true', () => { + it('should have an aria-modal=false', () => { cy.findByRole('dialog', {name: 'MIT License'}).should( 'have.attr', 'aria-modal', - 'true' + 'false' ); }); @@ -384,8 +384,8 @@ describe('Modal', () => { cy.findByRole('dialog', {name: 'Delete Item'}).should('have.attr', 'aria-labelledby'); }); - it('should have an aria-modal=true', () => { - cy.findByRole('dialog', {name: 'Delete Item'}).should('have.attr', 'aria-modal', 'true'); + it('should have an aria-modal=false', () => { + cy.findByRole('dialog', {name: 'Delete Item'}).should('have.attr', 'aria-modal', 'false'); }); it('should contain the title', () => { @@ -483,11 +483,11 @@ describe('Modal', () => { ); }); - it('should have an aria-modal=true', () => { + it('should have an aria-modal=false', () => { cy.findByRole('dialog', {name: 'Acknowledge License'}).should( 'have.attr', 'aria-modal', - 'true' + 'false' ); }); diff --git a/modules/react/modal/lib/Modal.tsx b/modules/react/modal/lib/Modal.tsx index 9ff391cbc4..faafc5d751 100644 --- a/modules/react/modal/lib/Modal.tsx +++ b/modules/react/modal/lib/Modal.tsx @@ -42,7 +42,7 @@ export const Modal = createContainer()({ /** * The `Modal.Card` is wraps a {@link PopupCard Popup.Card} which wraps a {@link Card}. It is * the `role="dialog"` element and is uses `useModalCard` behavior hook which sets - * `aria-modal="true"` and sets the `aria-labelledby` that points to the `id` of the + * `aria-modal="false"` and sets the `aria-labelledby` that points to the `id` of the * {@link ModalHeading Modal.Heading}. If you don't use a `Modal.Heading`, add an `aria-label` * instead. The default element is a `div` and can be changed via the `as` prop. */ diff --git a/modules/react/modal/lib/hooks/useModalCard.ts b/modules/react/modal/lib/hooks/useModalCard.ts index ab18e7ffda..9bcdf86c06 100644 --- a/modules/react/modal/lib/hooks/useModalCard.ts +++ b/modules/react/modal/lib/hooks/useModalCard.ts @@ -5,7 +5,14 @@ export const useModalCard = composeHooks( usePopupCard, createElemPropsHook(usePopupModel)(() => { return { - 'aria-modal': true, + /** + * `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal, + * including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers, + * including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver + * might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better + * VoiceOver experience. + */ + 'aria-modal': false, }; }) ); From 8d7ea547516e83b62e0ad497657b1397dc5550e8 Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Mon, 5 Aug 2024 20:28:58 +0000 Subject: [PATCH 10/26] chore: Release v10.3.51 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 11 files changed, 28 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e162de1a..1b06251280 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v10.3.51](https://github.com/Workday/canvas-kit/releases/tag/v10.3.51) (2024-08-05) + +### Accessibility + +- fix: Set aria-modal to false for better accessibility ([#2855](https://github.com/Workday/canvas-kit/pull/2855)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera) + + ## [v10.3.50](https://github.com/Workday/canvas-kit/releases/tag/v10.3.50) (2024-08-05) ### Components diff --git a/lerna.json b/lerna.json index ddab71363f..06eccd2c6b 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "10.3.50", + "version": "10.3.51", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index c2733f8882..72e4a3c30e 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "10.3.50", + "version": "10.3.51", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/docs/package.json b/modules/docs/package.json index a7cd345776..3010d6ad8f 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "10.3.50", + "version": "10.3.51", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^10.3.50", - "@workday/canvas-kit-preview-react": "^10.3.50", - "@workday/canvas-kit-react": "^10.3.50", - "@workday/canvas-kit-styling": "^10.3.50", + "@workday/canvas-kit-labs-react": "^10.3.51", + "@workday/canvas-kit-preview-react": "^10.3.51", + "@workday/canvas-kit-react": "^10.3.51", + "@workday/canvas-kit-styling": "^10.3.51", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "markdown-to-jsx": "^6.10.3", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index dcf2497b1a..ac0dae536b 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "10.3.50", + "version": "10.3.51", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.50", + "@workday/canvas-kit-react": "^10.3.51", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 27cd3a5601..523ccaa9b1 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "10.3.50", + "version": "10.3.51", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 5e0c83756c..3a0bdb0a4e 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "10.3.50", + "version": "10.3.51", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -47,8 +47,8 @@ "@emotion/is-prop-valid": "^1.1.1", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.50", - "@workday/canvas-kit-styling": "^10.3.50", + "@workday/canvas-kit-react": "^10.3.51", + "@workday/canvas-kit-styling": "^10.3.51", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 9b022f154b..bbd22b0692 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "10.3.50", + "version": "10.3.51", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index f335685e21..0beef53bde 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "10.3.50", + "version": "10.3.51", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^10.3.50", - "@workday/canvas-kit-styling": "^10.3.50", + "@workday/canvas-kit-popup-stack": "^10.3.51", + "@workday/canvas-kit-styling": "^10.3.51", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index a99e22edbc..d39eae813d 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "10.3.50", + "version": "10.3.51", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^10.3.50", + "@workday/canvas-kit-styling": "^10.3.51", "stylis": "4.0.13", "typescript": "4.2" }, diff --git a/modules/styling/package.json b/modules/styling/package.json index 4a450074bf..bd28b20edf 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "10.3.50", + "version": "10.3.51", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.50", + "@workday/canvas-kit-react": "^10.3.51", "@workday/canvas-tokens-web": "^1.0.0", "typescript": "4.2" } From 4fc6226c96c666fe5df801d7e75c81d5f1b01ae1 Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Mon, 5 Aug 2024 21:21:57 +0000 Subject: [PATCH 11/26] chore: Release v11.0.26 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 6 +++--- 14 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e75178515..390f5eb911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.0.26](https://github.com/Workday/canvas-kit/releases/tag/v11.0.26) (2024-08-05) + +### Accessibility + +- fix: Set aria-modal to false for better accessibility ([#2855](https://github.com/Workday/canvas-kit/pull/2855)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera) + + ## [v10.3.51](https://github.com/Workday/canvas-kit/releases/tag/v10.3.51) (2024-08-05) ### Accessibility diff --git a/lerna.json b/lerna.json index 3816b2b93d..6d7aaa7cd0 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.0.25", + "version": "11.0.26", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 41f2499726..9a40b2a9d4 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.0.25", + "version": "11.0.26", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 0560dafb3d..6729d739f9 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.0.25", + "version": "11.0.26", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 75af070228..816dbeb8b4 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.0.25", + "version": "11.0.26", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.0.25", - "@workday/canvas-kit-preview-react": "^11.0.25", - "@workday/canvas-kit-react": "^11.0.25", - "@workday/canvas-kit-styling": "^11.0.25", + "@workday/canvas-kit-labs-react": "^11.0.26", + "@workday/canvas-kit-preview-react": "^11.0.26", + "@workday/canvas-kit-react": "^11.0.26", + "@workday/canvas-kit-styling": "^11.0.26", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 663484f146..acc62317de 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.0.25", + "version": "11.0.26", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index a44ab13e82..dcd52977a7 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.0.25", + "version": "11.0.26", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.25", + "@workday/canvas-kit-react": "^11.0.26", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index e46ff3c6af..cbcfdff5a6 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.0.25", + "version": "11.0.26", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index 16243511e5..d529458cfe 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.0.25", + "version": "11.0.26", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 3a9552807a..3b3dccbc8c 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.0.25", + "version": "11.0.26", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.25", - "@workday/canvas-kit-styling": "^11.0.25", + "@workday/canvas-kit-react": "^11.0.26", + "@workday/canvas-kit-styling": "^11.0.26", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 326872e2da..fe694f41c6 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.0.25", + "version": "11.0.26", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 63eadaffa9..735d2d026b 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.0.25", + "version": "11.0.26", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.0.25", - "@workday/canvas-kit-styling": "^11.0.25", + "@workday/canvas-kit-popup-stack": "^11.0.26", + "@workday/canvas-kit-styling": "^11.0.26", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index fd70f21b5e..71fb7563a6 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.0.25", + "version": "11.0.26", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.0.25", + "@workday/canvas-kit-styling": "^11.0.26", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index 68ebf5104d..44e07b630c 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.0.25", + "version": "11.0.26", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,9 +53,9 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.25", - "@workday/canvas-tokens-web": "^2.0.0", + "@workday/canvas-kit-react": "^11.0.26", "@workday/canvas-system-icons-web": "^3.0.0", + "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" } } From a29eab76af3ff448617de198c8f57b0094edfa04 Mon Sep 17 00:00:00 2001 From: Thu Nguyen Date: Mon, 12 Aug 2024 08:34:56 -0700 Subject: [PATCH 12/26] fix(Checkbox): Remove console warning (#2863) Fixes: #2827 [category:Components] --- modules/react/checkbox/lib/CheckboxInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/react/checkbox/lib/CheckboxInput.tsx b/modules/react/checkbox/lib/CheckboxInput.tsx index 3ebe0665e8..5ad88ef6cb 100644 --- a/modules/react/checkbox/lib/CheckboxInput.tsx +++ b/modules/react/checkbox/lib/CheckboxInput.tsx @@ -223,8 +223,8 @@ const checkboxInputStencil = createStencil({ export const CheckboxInput = createComponent('input')({ displayName: 'CheckboxInput', - Component: ({variant, error, ...elemProps}: CheckboxProps, ref, Element) => { - const {checked, disabled, indeterminate} = elemProps; + Component: ({variant, error, indeterminate, ...elemProps}: CheckboxProps, ref, Element) => { + const {checked, disabled} = elemProps; return ( Date: Mon, 12 Aug 2024 15:35:48 +0000 Subject: [PATCH 13/26] chore: Release v11.0.27 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 14 files changed, 31 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 390f5eb911..24f53917b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.0.27](https://github.com/Workday/canvas-kit/releases/tag/v11.0.27) (2024-08-12) + +### Components + +- fix(Checkbox): Remove console warning ([#2863](https://github.com/Workday/canvas-kit/pull/2863)) ([@thunguyen19](https://github.com/thunguyen19)) + + ## [v11.0.26](https://github.com/Workday/canvas-kit/releases/tag/v11.0.26) (2024-08-05) ### Accessibility diff --git a/lerna.json b/lerna.json index 6d7aaa7cd0..837db9f312 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.0.26", + "version": "11.0.27", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 9a40b2a9d4..25e10c67b0 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.0.26", + "version": "11.0.27", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 6729d739f9..8566e689c3 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.0.26", + "version": "11.0.27", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 816dbeb8b4..140bf8a0dc 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.0.26", + "version": "11.0.27", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.0.26", - "@workday/canvas-kit-preview-react": "^11.0.26", - "@workday/canvas-kit-react": "^11.0.26", - "@workday/canvas-kit-styling": "^11.0.26", + "@workday/canvas-kit-labs-react": "^11.0.27", + "@workday/canvas-kit-preview-react": "^11.0.27", + "@workday/canvas-kit-react": "^11.0.27", + "@workday/canvas-kit-styling": "^11.0.27", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index acc62317de..7d6a39c63d 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.0.26", + "version": "11.0.27", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index dcd52977a7..3d4443b49d 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.0.26", + "version": "11.0.27", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.26", + "@workday/canvas-kit-react": "^11.0.27", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index cbcfdff5a6..f92524a27a 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.0.26", + "version": "11.0.27", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index d529458cfe..3c329ba9db 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.0.26", + "version": "11.0.27", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 3b3dccbc8c..0587f81fed 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.0.26", + "version": "11.0.27", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.26", - "@workday/canvas-kit-styling": "^11.0.26", + "@workday/canvas-kit-react": "^11.0.27", + "@workday/canvas-kit-styling": "^11.0.27", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index fe694f41c6..38f5ce7a8a 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.0.26", + "version": "11.0.27", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 735d2d026b..2b390de005 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.0.26", + "version": "11.0.27", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.0.26", - "@workday/canvas-kit-styling": "^11.0.26", + "@workday/canvas-kit-popup-stack": "^11.0.27", + "@workday/canvas-kit-styling": "^11.0.27", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index 71fb7563a6..795a9099a5 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.0.26", + "version": "11.0.27", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.0.26", + "@workday/canvas-kit-styling": "^11.0.27", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index 44e07b630c..def4a926e0 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.0.26", + "version": "11.0.27", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.26", + "@workday/canvas-kit-react": "^11.0.27", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" From d52f5c29b5ee0296fd415d02c7edb127af9b1a59 Mon Sep 17 00:00:00 2001 From: Alan B Smith Date: Mon, 12 Aug 2024 17:22:24 -0600 Subject: [PATCH 14/26] feat: Add Divider component (#2866) Resolves: #2864 [category:Components] Co-authored-by: @mannycarrera4 --- modules/preview-react/divider/LICENSE | 52 +++++++++ modules/preview-react/divider/README.md | 11 ++ modules/preview-react/divider/index.ts | 1 + modules/preview-react/divider/lib/Divider.tsx | 60 ++++++++++ .../preview-react/divider/spec/SSR.spec.tsx | 13 +++ .../preview-react/divider/spec/tsconfig.json | 4 + .../divider/stories/Divider.stories.mdx | 38 +++++++ .../divider/stories/examples/Basic.tsx | 105 ++++++++++++++++++ .../divider/stories/examples/CustomSpace.tsx | 32 ++++++ .../divider/stories/tsconfig.json | 4 + .../visual-testing/stories_Divider.tsx | 45 ++++++++ modules/preview-react/index.ts | 3 +- 12 files changed, 367 insertions(+), 1 deletion(-) create mode 100644 modules/preview-react/divider/LICENSE create mode 100644 modules/preview-react/divider/README.md create mode 100644 modules/preview-react/divider/index.ts create mode 100644 modules/preview-react/divider/lib/Divider.tsx create mode 100644 modules/preview-react/divider/spec/SSR.spec.tsx create mode 100644 modules/preview-react/divider/spec/tsconfig.json create mode 100644 modules/preview-react/divider/stories/Divider.stories.mdx create mode 100644 modules/preview-react/divider/stories/examples/Basic.tsx create mode 100644 modules/preview-react/divider/stories/examples/CustomSpace.tsx create mode 100644 modules/preview-react/divider/stories/tsconfig.json create mode 100644 modules/preview-react/divider/stories/visual-testing/stories_Divider.tsx diff --git a/modules/preview-react/divider/LICENSE b/modules/preview-react/divider/LICENSE new file mode 100644 index 0000000000..10966086f1 --- /dev/null +++ b/modules/preview-react/divider/LICENSE @@ -0,0 +1,52 @@ +Apache License, Version 2.0 Apache License Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: +You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +©2021 Workday, Inc. All rights reserved. Workday and the Workday logo are registered trademarks of Workday, Inc. All other brand and product names are trademarks or registered trademarks of their respective holders. + + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/modules/preview-react/divider/README.md b/modules/preview-react/divider/README.md new file mode 100644 index 0000000000..ccdf924c06 --- /dev/null +++ b/modules/preview-react/divider/README.md @@ -0,0 +1,11 @@ + +# Canvas Kit Divider + + + PREVIEW: Beta + This component is work in progress and currently in prerelease. + +A divider to segment and visually organize content + +View the [documentation for Divider](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react) +on Storybook. diff --git a/modules/preview-react/divider/index.ts b/modules/preview-react/divider/index.ts new file mode 100644 index 0000000000..fa2b087ab5 --- /dev/null +++ b/modules/preview-react/divider/index.ts @@ -0,0 +1 @@ +export * from './lib/Divider'; diff --git a/modules/preview-react/divider/lib/Divider.tsx b/modules/preview-react/divider/lib/Divider.tsx new file mode 100644 index 0000000000..d201186c5a --- /dev/null +++ b/modules/preview-react/divider/lib/Divider.tsx @@ -0,0 +1,60 @@ +import * as React from 'react'; +import {createComponent} from '@workday/canvas-kit-react/common'; +import { + createStencil, + handleCsProp, + CSProps, + calc, + cssVar, + px2rem, +} from '@workday/canvas-kit-styling'; +import {system} from '@workday/canvas-tokens-web'; + +export const dividerStencil = createStencil({ + vars: { + space: cssVar(system.space.x4), + }, + base: ({space}) => { + return { + display: 'block', + height: px2rem(1), + border: 'none', + borderTop: `1px solid ${system.color.border.divider}`, + margin: `${calc.divide(space, 2)} 0`, + }; + }, +}); + +export interface DividerProps extends CSProps { + /** + * Applies top and bottom margin evenly. It divides the provided value by two and applies half to each end. + * E.g. `space="2rem"` would apply `1rem` margin to the top, and `1rem` margin to the bottom. + * @default `system.space.x4` (1rem) + */ + space?: string; +} + +/** + * # Divider + * A divider to segment and visually organize content. By default, it renders a semantic `[
](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)` element. + * + * [View Docs](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react) + * + * The `space` prop will equally apply top and bottom margin styles. + * In the example below, `x2` (0.5rem), adds `0.25rem` margin to the top and `0.25rem` to the bottom + * + * @example + * ```tsx + * import { Divider } from '@workday/canvas-kit-preview-react/divider'; + * import {system} from '@workday/canvas-tokens-web'; + * + * + * + * ``` + */ +export const Divider = createComponent('hr')({ + displayName: 'Divider', + Component: ({space, ...elemProps}: DividerProps, ref, Element) => ( + + ), +}); diff --git a/modules/preview-react/divider/spec/SSR.spec.tsx b/modules/preview-react/divider/spec/SSR.spec.tsx new file mode 100644 index 0000000000..415048b4c0 --- /dev/null +++ b/modules/preview-react/divider/spec/SSR.spec.tsx @@ -0,0 +1,13 @@ +/** + * @jest-environment node + */ +import React from 'react'; +import {renderToString} from 'react-dom/server'; +import {Divider} from '../'; + +describe('Divider', () => { + it('should render on a server without crashing', () => { + const ssrRender = () => renderToString(); + expect(ssrRender).not.toThrow(); + }); +}); diff --git a/modules/preview-react/divider/spec/tsconfig.json b/modules/preview-react/divider/spec/tsconfig.json new file mode 100644 index 0000000000..d079d9f251 --- /dev/null +++ b/modules/preview-react/divider/spec/tsconfig.json @@ -0,0 +1,4 @@ + +{ + "extends": "../../../../tsconfig.spec.json" +} diff --git a/modules/preview-react/divider/stories/Divider.stories.mdx b/modules/preview-react/divider/stories/Divider.stories.mdx new file mode 100644 index 0000000000..4f3dcbe11d --- /dev/null +++ b/modules/preview-react/divider/stories/Divider.stories.mdx @@ -0,0 +1,38 @@ + +import {SymbolDoc, Specifications} from '@workday/canvas-kit-docs'; + +import {Divider} from '@workday/canvas-kit-preview-react/divider'; +import {Basic} from './examples/Basic'; +import {CustomSpace} from './examples/CustomSpace'; + + + +# Divider + +A `Divider` segments and visually organizes content. + +## Installation + +```sh +yarn add @workday/canvas-kit-preview-react +``` + +## Usage + +Use a `Divider` to separate content and create visual hierarchy. Typically they are used between paragraph sections to indicate a break or shift in content. However, they can also be used as decorative elements to provide greater emphasis and visual hierarchy. + +### Basic Example + +By default, `Divider` renders a `
` (horizontal rule) element with `0.5rem` of margin on top and bottom. The `space` prop allows you to adjust the vertical margin evenly. In the example below, the `Divider`s provide a subtle deliniation between each profile card without being as visually prominent as a `Card`. The `space` is adjusted to `0.25rem` which applied `0.125rem` to the top and bottom margin. + + + +### Custom Space + +You might also want to apply custom space to `Divider` where the top and bottom margin are not equal. The best way to achieve this is with `createStyles` and the `cs` property. In the example below, the `Divider` is applied as a decorative element to add emphasis to the section heading. Custom styles are defined in the `createStyles` function outside the component and are passed to `Divider`'s `cs` prop. These styles remove the top margin and set the bottom margin to `1rem`. + + + +## Component API + + diff --git a/modules/preview-react/divider/stories/examples/Basic.tsx b/modules/preview-react/divider/stories/examples/Basic.tsx new file mode 100644 index 0000000000..df1fd32eb2 --- /dev/null +++ b/modules/preview-react/divider/stories/examples/Basic.tsx @@ -0,0 +1,105 @@ +import React from 'react'; +import {Divider} from '@workday/canvas-kit-preview-react/divider'; +import {createStyles} from '@workday/canvas-kit-styling'; +import {system} from '@workday/canvas-tokens-web'; +import {Avatar} from '@workday/canvas-kit-react/avatar'; + +const sectionStyles = createStyles({ + display: 'flex', + flexDirection: 'column', + gap: system.space.x4, + maxWidth: '40rem', +}); + +export const Basic = () => { + const lastIndex = maintainerList.length - 1; + return ( +
+ {maintainerList.map((maintainerData, index) => ( + <> + + {index !== lastIndex && } + + ))} +
+ ); +}; + +const maintainerList = [ + { + id: '44883293', + name: 'Josh Bagwell', + bio: 'Software Development Engineer', + }, + { + id: '338257', + name: 'Nicholas Boll', + bio: 'Principal Software Development Engineer', + }, + { + id: '7966550', + name: 'Manuel Carrera', + bio: 'Sr. Software Development Engineer', + }, + { + id: '146020', + name: 'James Fan', + bio: 'Sr. Software Development Engineer', + }, + { + id: '48605821', + name: 'Raisa Primerova', + bio: 'Software Development Engineer', + }, + { + id: '4818182', + name: 'Alan Smith', + bio: 'Principal Software Development Engineer', + }, +]; + +const profileCardStyles = createStyles({ + display: 'grid', + gridGap: '0.5rem', + gridTemplateColumns: '5rem 1fr', + gridTemplateRows: '1fr 1fr', +}); + +const profileCardAvatarStyles = createStyles({ + gridColumn: '1', + gridRow: '1 / 3', +}); + +const profileCardHeadingStyles = createStyles({ + ...system.type.body.large, + fontWeight: system.fontWeight.bold, + gridColumn: '2/3', + gridRow: '1', + margin: 0, +}); + +const profileCardBodyStyles = createStyles({ + ...system.type.body.small, + gridColumn: '2', + gridRow: '2', + margin: 0, +}); + +interface ProfileCardProps { + id: string; + name: string; + bio: string; +} + +const ProfileCard = ({id, name, bio}: ProfileCardProps) => ( +
+ +

{name}

+

{bio}

+
+); diff --git a/modules/preview-react/divider/stories/examples/CustomSpace.tsx b/modules/preview-react/divider/stories/examples/CustomSpace.tsx new file mode 100644 index 0000000000..8752c01fd1 --- /dev/null +++ b/modules/preview-react/divider/stories/examples/CustomSpace.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import {Divider} from '@workday/canvas-kit-preview-react/divider'; +import {createStyles} from '@workday/canvas-kit-styling'; +import {system} from '@workday/canvas-tokens-web'; + +const headingStyles = createStyles({ + ...system.type.body.large, + fontWeight: system.fontWeight.bold, + margin: 0, +}); + +const bodyStyles = createStyles({ + ...system.type.body.small, + margin: 0, +}); + +const customDividerSpace = createStyles({ + margin: `0 0 ${system.space.x4}`, +}); + +export const CustomSpace = () => { + return ( +
+

Quote of the Day

+ +

+ "It is not our differences that divide us. It is our inability to recognize, accept, and + celebrate those differences." – Audre Lorde +

+
+ ); +}; diff --git a/modules/preview-react/divider/stories/tsconfig.json b/modules/preview-react/divider/stories/tsconfig.json new file mode 100644 index 0000000000..721d5175e2 --- /dev/null +++ b/modules/preview-react/divider/stories/tsconfig.json @@ -0,0 +1,4 @@ + +{ + "extends": "../../../../tsconfig.stories.json" +} diff --git a/modules/preview-react/divider/stories/visual-testing/stories_Divider.tsx b/modules/preview-react/divider/stories/visual-testing/stories_Divider.tsx new file mode 100644 index 0000000000..b0f0d0a038 --- /dev/null +++ b/modules/preview-react/divider/stories/visual-testing/stories_Divider.tsx @@ -0,0 +1,45 @@ +import React from 'react'; + +import {StaticStates, ComponentStatesTable} from '@workday/canvas-kit-react/testing'; +import {withSnapshotsEnabled} from '../../../../../utils/storybook'; + +import {Divider} from '@workday/canvas-kit-preview-react/divider'; +import {system} from '@workday/canvas-tokens-web'; + +export default withSnapshotsEnabled({ + title: 'Testing/Preview/Divider', + component: Divider, +}); + +export const DividerStates = () => { + return ( + + + {props => { + return ( +
+

Quote of the Day

+ +

+ "It is not our differences that divide us. It is our inability to recognize, accept, + and celebrate those differences." – Audre Lorde +

+
+ ); + }} +
+
+ ); +}; diff --git a/modules/preview-react/index.ts b/modules/preview-react/index.ts index 32bd20a30f..d0a5f54083 100644 --- a/modules/preview-react/index.ts +++ b/modules/preview-react/index.ts @@ -1,12 +1,13 @@ export * from './color-picker'; +export * from './divider'; export * from './form-field'; export * from './loading-sparkles'; export * from './menu'; export * from './pill'; +export * from './radio'; export * from './segmented-control'; export * from './select'; export * from './side-panel'; export * from './status-indicator'; export * from './text-area'; export * from './text-input'; -export * from './radio'; From 0b38e0b6ec6a0990e4bad0375dc57ecf15239d2c Mon Sep 17 00:00:00 2001 From: myvuuu Date: Wed, 14 Aug 2024 16:40:10 +0000 Subject: [PATCH 15/26] chore: Release v11.1.0 [skip release] --- CHANGELOG.md | 5 +++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 14 files changed, 29 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24f53917b5..8e59c38561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.1.0](https://github.com/Workday/canvas-kit/releases/tag/v11.1.0) (2024-08-14) + + + + ## [v11.0.27](https://github.com/Workday/canvas-kit/releases/tag/v11.0.27) (2024-08-12) ### Components diff --git a/lerna.json b/lerna.json index 837db9f312..3e1a65681f 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.0.27", + "version": "11.1.0", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 25e10c67b0..42ac691865 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.0.27", + "version": "11.1.0", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 8566e689c3..612b5afc86 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.0.27", + "version": "11.1.0", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 140bf8a0dc..23f6557c92 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.0.27", + "version": "11.1.0", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.0.27", - "@workday/canvas-kit-preview-react": "^11.0.27", - "@workday/canvas-kit-react": "^11.0.27", - "@workday/canvas-kit-styling": "^11.0.27", + "@workday/canvas-kit-labs-react": "^11.1.0", + "@workday/canvas-kit-preview-react": "^11.1.0", + "@workday/canvas-kit-react": "^11.1.0", + "@workday/canvas-kit-styling": "^11.1.0", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 7d6a39c63d..9e6f18e30c 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.0.27", + "version": "11.1.0", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 3d4443b49d..451791a195 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.0.27", + "version": "11.1.0", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.27", + "@workday/canvas-kit-react": "^11.1.0", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index f92524a27a..184eae7398 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.0.27", + "version": "11.1.0", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index 3c329ba9db..e6217ab37d 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.0.27", + "version": "11.1.0", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 0587f81fed..0c1c9ab613 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.0.27", + "version": "11.1.0", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.27", - "@workday/canvas-kit-styling": "^11.0.27", + "@workday/canvas-kit-react": "^11.1.0", + "@workday/canvas-kit-styling": "^11.1.0", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 38f5ce7a8a..b574986f63 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.0.27", + "version": "11.1.0", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 2b390de005..727e5a8b33 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.0.27", + "version": "11.1.0", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.0.27", - "@workday/canvas-kit-styling": "^11.0.27", + "@workday/canvas-kit-popup-stack": "^11.1.0", + "@workday/canvas-kit-styling": "^11.1.0", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index 795a9099a5..edddc2da17 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.0.27", + "version": "11.1.0", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.0.27", + "@workday/canvas-kit-styling": "^11.1.0", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index def4a926e0..7934361f29 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.0.27", + "version": "11.1.0", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.0.27", + "@workday/canvas-kit-react": "^11.1.0", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" From a510ed1a54b71e0e44b04b606e0b36f9e606acc4 Mon Sep 17 00:00:00 2001 From: Nicholas Boll Date: Wed, 14 Aug 2024 15:55:04 -0600 Subject: [PATCH 16/26] fix(select): Clicking the input closes the menu (#2869) Redirect the `PopupModel.state.targetRef` to the user input element instead of the hidden server input element. Tests were added to specify this behavior. Fixes: #2868 [category:Components] --- cypress/integration/Autocomplete.spec.ts | 10 ++++++ cypress/integration/Select.spec.ts | 10 ++++++ modules/react/select/lib/Select.tsx | 24 +------------- .../react/select/lib/hooks/useSelectInput.ts | 33 ++++++++++++++++--- 4 files changed, 50 insertions(+), 27 deletions(-) diff --git a/cypress/integration/Autocomplete.spec.ts b/cypress/integration/Autocomplete.spec.ts index b611e16885..c9d36026a4 100644 --- a/cypress/integration/Autocomplete.spec.ts +++ b/cypress/integration/Autocomplete.spec.ts @@ -55,6 +55,16 @@ describe('Autocomplete', () => { cy.findByRole('combobox').click(); }); + context('when the combobox is clicked', () => { + beforeEach(() => { + cy.findByRole('combobox').click(); + }); + + it('should close the menu', () => { + cy.findByRole('listbox').should('not.exist'); + }); + }); + it('should set the aria-owns to reference the listbox element', () => { cy.findByRole('combobox').should(haveAttrMatchingIdOf('aria-controls', '[role=listbox]')); }); diff --git a/cypress/integration/Select.spec.ts b/cypress/integration/Select.spec.ts index b8f761441c..601a2dd122 100644 --- a/cypress/integration/Select.spec.ts +++ b/cypress/integration/Select.spec.ts @@ -104,6 +104,16 @@ describe('Select', () => { cy.findByRole('combobox').click(); }); + context('when the combobox is clicked', () => { + beforeEach(() => { + cy.findByRole('combobox').click(); + }); + + it('should close the menu', () => { + cy.findByRole('listbox').should('not.exist'); + }); + }); + context( 'when a character is typed (provided no other characters have been typed in the last 500ms), the select should advance assistive focus to the first matching option beyond the currently selected option (cycling back to the beginning of the options if necessary) and scroll that option into view', () => { diff --git a/modules/react/select/lib/Select.tsx b/modules/react/select/lib/Select.tsx index 1132d8dd8a..f728d5da3b 100644 --- a/modules/react/select/lib/Select.tsx +++ b/modules/react/select/lib/Select.tsx @@ -4,7 +4,6 @@ import { ExtractProps, createContainer, Themeable, - useLocalRef, } from '@workday/canvas-kit-react/common'; import {Combobox} from '@workday/canvas-kit-react/combobox'; @@ -67,27 +66,6 @@ export const SelectInput = createSubcomponent(TextInput)({ Element, model ) => { - const {localRef, elementRef} = useLocalRef(ref); - - // We need to create a proxy between the multiple inputs. We need to redirect a few methods to - // the visible input - React.useImperativeHandle( - elementRef, - () => { - if (localRef.current) { - localRef.current.focus = (options?: FocusOptions) => { - textInputProps.ref.current!.focus(options); - }; - localRef.current.blur = () => { - textInputProps.ref.current!.blur(); - }; - } - - return localRef.current!; - }, - [textInputProps.ref, localRef] - ); - return ( {inputStartIcon && model.state.selectedIds.length > 0 && ( @@ -106,7 +84,7 @@ export const SelectInput = createSubcomponent(TextInput)({ onInput={onInput} value={value} name={name} - ref={elementRef} + ref={ref} /> {/* Visual input */} { - const {elementRef} = useLocalRef(ref as any); - const textInputRef = React.useRef(null); + // const textInputRef = React.useRef(null); + const {elementRef: textInputElementRef, localRef: textInputRef} = useLocalRef( + // PopupModel says the targetRef is a `HTMLButtonElement`, but it is a `HTMLInputElement` + model.state.targetRef as any as React.Ref + ); + + const {localRef, elementRef} = useLocalRef(ref as React.Ref); + + // We need to create a proxy between the multiple inputs. We need to redirect a few methods to + // the visible input + React.useImperativeHandle( + elementRef, + () => { + if (localRef.current) { + localRef.current.focus = (options?: FocusOptions) => { + textInputRef.current!.focus(options); + }; + localRef.current.blur = () => { + textInputRef.current!.blur(); + }; + } + + return localRef.current!; + }, + [textInputRef, localRef] + ); + + // Remap the Popup model's targetRef to be the visible ref. `ref` and `model.state.targetRef` are already linked. We have to override that. // Update the text value of the input const handleOnChange = (event: React.ChangeEvent) => { @@ -151,14 +177,13 @@ export const useSelectInput = composeHooks( textInputRef.current?.focus(); }, textInputProps: { - ref: textInputRef, + ref: textInputElementRef, onChange: noop, value: model.state.selectedIds.length > 0 && model.state.items.length > 0 ? model.navigation.getItem(model.state.selectedIds[0], model).textValue : '', }, - ref: elementRef, 'aria-haspopup': 'menu', } as const; } From d6a5bd2bbec95ec8e505ea1ddd98ef9454b55a9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:56:09 -0600 Subject: [PATCH 17/26] chore(deps): Bump axios from 1.6.7 to 1.7.4 (#2867) Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4. [category:Dependencies] Co-authored-by: @dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index a92aad20bd..c36dae900b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5733,11 +5733,11 @@ axe-core@^3.0.3, axe-core@^3.1.2, axe-core@^3.4.0, axe-core@^3.5.1: integrity sha512-HZpLE7xu05+8AbpqXITGdxp1Xwk8ysAXrg7MiKRY27py3DAyEJpoJQo1727pWF3F+O79V3r+cTWhOzfB49P89w== axios@^1.0.0: - version "1.6.7" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.7.tgz#7b48c2e27c96f9c68a2f8f31e2ab19f59b06b0a7" - integrity sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA== + version "1.7.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" + integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== dependencies: - follow-redirects "^1.15.4" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -9064,7 +9064,7 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.15.4: +follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== From 3dbd98287262af9e8a614dcc1942652ead4cb2b5 Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Wed, 14 Aug 2024 21:57:06 +0000 Subject: [PATCH 18/26] chore: Release v10.3.52 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 11 files changed, 28 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b06251280..6e9c9b6d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v10.3.52](https://github.com/Workday/canvas-kit/releases/tag/v10.3.52) (2024-08-14) + +### Components + +- fix(select): Clicking the input closes the menu ([#2869](https://github.com/Workday/canvas-kit/pull/2869)) ([@NicholasBoll](https://github.com/NicholasBoll)) + + ## [v10.3.51](https://github.com/Workday/canvas-kit/releases/tag/v10.3.51) (2024-08-05) ### Accessibility diff --git a/lerna.json b/lerna.json index 06eccd2c6b..6419c24c96 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "10.3.51", + "version": "10.3.52", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 72e4a3c30e..74ddea674f 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "10.3.51", + "version": "10.3.52", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/docs/package.json b/modules/docs/package.json index 3010d6ad8f..ddc72e0616 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "10.3.51", + "version": "10.3.52", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^10.3.51", - "@workday/canvas-kit-preview-react": "^10.3.51", - "@workday/canvas-kit-react": "^10.3.51", - "@workday/canvas-kit-styling": "^10.3.51", + "@workday/canvas-kit-labs-react": "^10.3.52", + "@workday/canvas-kit-preview-react": "^10.3.52", + "@workday/canvas-kit-react": "^10.3.52", + "@workday/canvas-kit-styling": "^10.3.52", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "markdown-to-jsx": "^6.10.3", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index ac0dae536b..7d4fcdc115 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "10.3.51", + "version": "10.3.52", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.51", + "@workday/canvas-kit-react": "^10.3.52", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 523ccaa9b1..d51f08607a 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "10.3.51", + "version": "10.3.52", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 3a0bdb0a4e..4f31f730ff 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "10.3.51", + "version": "10.3.52", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -47,8 +47,8 @@ "@emotion/is-prop-valid": "^1.1.1", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.51", - "@workday/canvas-kit-styling": "^10.3.51", + "@workday/canvas-kit-react": "^10.3.52", + "@workday/canvas-kit-styling": "^10.3.52", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index bbd22b0692..172ecb88e2 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "10.3.51", + "version": "10.3.52", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 0beef53bde..388150c555 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "10.3.51", + "version": "10.3.52", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^10.3.51", - "@workday/canvas-kit-styling": "^10.3.51", + "@workday/canvas-kit-popup-stack": "^10.3.52", + "@workday/canvas-kit-styling": "^10.3.52", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index d39eae813d..56be16fd08 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "10.3.51", + "version": "10.3.52", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^10.3.51", + "@workday/canvas-kit-styling": "^10.3.52", "stylis": "4.0.13", "typescript": "4.2" }, diff --git a/modules/styling/package.json b/modules/styling/package.json index bd28b20edf..c0a4602519 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "10.3.51", + "version": "10.3.52", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.51", + "@workday/canvas-kit-react": "^10.3.52", "@workday/canvas-tokens-web": "^1.0.0", "typescript": "4.2" } From 203121ef407cd868aa59237b56541705c3ba67ab Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Mon, 19 Aug 2024 13:11:50 -0600 Subject: [PATCH 19/26] chore: Merge support into master --- modules/react/select/lib/Select.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/react/select/lib/Select.tsx b/modules/react/select/lib/Select.tsx index 22807176a7..1519a1abd5 100644 --- a/modules/react/select/lib/Select.tsx +++ b/modules/react/select/lib/Select.tsx @@ -95,12 +95,8 @@ export const SelectInput = createSubcomponent(TextInput)({ onInput={onInput} value={value} name={name} -<<<<<<< HEAD ref={ref} -======= - ref={elementRef} {...hiddenSelectInputStencil()} ->>>>>>> upstream/master /> {/* Visual input */} Date: Tue, 20 Aug 2024 19:00:54 +0000 Subject: [PATCH 20/26] chore: Release v11.1.1 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 6 +++--- 14 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cffbf0bcc3..6de811d702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.1.1](https://github.com/Workday/canvas-kit/releases/tag/v11.1.1) (2024-08-20) + +### Components + +- fix(select): Clicking the input closes the menu ([#2869](https://github.com/Workday/canvas-kit/pull/2869)) ([@NicholasBoll](https://github.com/NicholasBoll)) + + ## [v10.3.52](https://github.com/Workday/canvas-kit/releases/tag/v10.3.52) (2024-08-14) ### Components diff --git a/lerna.json b/lerna.json index 3e1a65681f..b6635ae372 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.1.0", + "version": "11.1.1", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 42ac691865..76046d8f63 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.1.0", + "version": "11.1.1", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 612b5afc86..1e982fefcf 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.1.0", + "version": "11.1.1", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 23f6557c92..1676101a52 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.1.0", + "version": "11.1.1", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.1.0", - "@workday/canvas-kit-preview-react": "^11.1.0", - "@workday/canvas-kit-react": "^11.1.0", - "@workday/canvas-kit-styling": "^11.1.0", + "@workday/canvas-kit-labs-react": "^11.1.1", + "@workday/canvas-kit-preview-react": "^11.1.1", + "@workday/canvas-kit-react": "^11.1.1", + "@workday/canvas-kit-styling": "^11.1.1", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 9e6f18e30c..6f4b0a6763 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.1.0", + "version": "11.1.1", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 451791a195..405b17dda8 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.1.0", + "version": "11.1.1", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.0", + "@workday/canvas-kit-react": "^11.1.1", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 184eae7398..0f7899ff5a 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.1.0", + "version": "11.1.1", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index e6217ab37d..04a357e966 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.1.0", + "version": "11.1.1", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 0c1c9ab613..b09f48cbf2 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.1.0", + "version": "11.1.1", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.0", - "@workday/canvas-kit-styling": "^11.1.0", + "@workday/canvas-kit-react": "^11.1.1", + "@workday/canvas-kit-styling": "^11.1.1", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index b574986f63..b6d7032f36 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.1.0", + "version": "11.1.1", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 727e5a8b33..79d821b555 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.1.0", + "version": "11.1.1", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.1.0", - "@workday/canvas-kit-styling": "^11.1.0", + "@workday/canvas-kit-popup-stack": "^11.1.1", + "@workday/canvas-kit-styling": "^11.1.1", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index edddc2da17..e8ed7bf9b8 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.1.0", + "version": "11.1.1", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.1.0", + "@workday/canvas-kit-styling": "^11.1.1", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index 931259bebd..919fbb1e85 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.1.0", + "version": "11.1.1", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,9 +53,9 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.0", - "@workday/canvas-tokens-web": "^2.0.0", + "@workday/canvas-kit-react": "^11.1.1", "@workday/canvas-system-icons-web": "^3.0.0", + "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" } } From 93f16c1c165761b19bea9c7f18429187ad93877b Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Tue, 20 Aug 2024 15:33:54 -0600 Subject: [PATCH 21/26] fix: Update select to trigger onChange (#2874) Fixes: https://github.com/Workday/canvas-kit/issues/2873 [category:Components] Co-authored-by: manuel.carrera --- cypress/integration/Select.spec.ts | 29 +++++++++++++++++++ .../react/select/lib/hooks/useSelectInput.ts | 6 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/cypress/integration/Select.spec.ts b/cypress/integration/Select.spec.ts index 601a2dd122..9933d3a076 100644 --- a/cypress/integration/Select.spec.ts +++ b/cypress/integration/Select.spec.ts @@ -341,6 +341,18 @@ describe('Select', () => { ); }); }); + context('when a value is selected', () => { + beforeEach(() => { + cy.findByRole('combobox').focus(); + cy.focused().realType('{downarrow}'); + }); + it('should select phone and the selected value should be visible', () => { + // Select Phone + cy.focused().realType('ph'); + cy.focused().realType('{enter}'); + cy.findByText('Selected Value: Phone'); + }); + }); }); context('given the "Disabled Options" story with a disabled option', () => { @@ -409,6 +421,23 @@ describe('Select', () => { }); }); + context(`given the "Complex" story is rendered`, () => { + beforeEach(() => { + h.stories.load('Components/Inputs/Select', 'Complex'); + cy.findByRole('combobox').focus(); + cy.focused().realType('{downarrow}'); + }); + + context('when a value is selected with an id and text', () => { + it('should display the correct id and value of the selected Phone', () => { + cy.focused().realType('ph'); + cy.focused().realType('{enter}'); + cy.findByText('Id: phone'); + cy.findByText('Value: Phone'); + }); + }); + }); + context(`given the "FetchingDynamicItems" story is rendered`, () => { beforeEach(() => { h.stories.load('Components/Inputs/Select', 'FetchingDynamicItems'); diff --git a/modules/react/select/lib/hooks/useSelectInput.ts b/modules/react/select/lib/hooks/useSelectInput.ts index eea1d90e48..72a6b97d71 100644 --- a/modules/react/select/lib/hooks/useSelectInput.ts +++ b/modules/react/select/lib/hooks/useSelectInput.ts @@ -28,7 +28,6 @@ export const useSelectInput = composeHooks( useComboboxMoveCursorToSelected, createElemPropsHook(useSelectModel)( (model, ref, elemProps: {keySofar?: string; placeholder?: string; value?: string} = {}) => { - // const textInputRef = React.useRef(null); const {elementRef: textInputElementRef, localRef: textInputRef} = useLocalRef( // PopupModel says the targetRef is a `HTMLButtonElement`, but it is a `HTMLInputElement` model.state.targetRef as any as React.Ref @@ -89,6 +88,7 @@ export const useSelectInput = composeHooks( model.state.selectedIds[0] ) { const value = model.navigation.getItem(model.state.selectedIds[0], model).id; + const oldValue = model.state.inputRef.current.value; // force the hidden input to have the correct value if (model.state.inputRef.current.value !== value) { @@ -103,8 +103,8 @@ export const useSelectInput = composeHooks( } if ( - model.state.selectedIds[0] !== value && - model.state.inputRef.current.value !== value + model.state.selectedIds[0] !== oldValue && + model.state.inputRef.current.value !== oldValue ) { // Programmatically dispatch an onChange once items are loaded. This account for when a consumer wants an initial selected item and they're loading them from a server. dispatchInputEvent(model.state.inputRef.current, value); From e8774056fbabc57307b542429ebd2742b024175b Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Tue, 20 Aug 2024 21:34:33 +0000 Subject: [PATCH 22/26] chore: Release v10.3.53 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 11 files changed, 28 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e9c9b6d1c..7a29a1e368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v10.3.53](https://github.com/Workday/canvas-kit/releases/tag/v10.3.53) (2024-08-20) + +### Components + +- fix: Update select to trigger onChange ([#2874](https://github.com/Workday/canvas-kit/pull/2874)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera) + + ## [v10.3.52](https://github.com/Workday/canvas-kit/releases/tag/v10.3.52) (2024-08-14) ### Components diff --git a/lerna.json b/lerna.json index 6419c24c96..5e35f557f6 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "10.3.52", + "version": "10.3.53", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 74ddea674f..b2b37db121 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "10.3.52", + "version": "10.3.53", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/docs/package.json b/modules/docs/package.json index ddc72e0616..ec7a3c9fa4 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "10.3.52", + "version": "10.3.53", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^10.3.52", - "@workday/canvas-kit-preview-react": "^10.3.52", - "@workday/canvas-kit-react": "^10.3.52", - "@workday/canvas-kit-styling": "^10.3.52", + "@workday/canvas-kit-labs-react": "^10.3.53", + "@workday/canvas-kit-preview-react": "^10.3.53", + "@workday/canvas-kit-react": "^10.3.53", + "@workday/canvas-kit-styling": "^10.3.53", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "markdown-to-jsx": "^6.10.3", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 7d4fcdc115..4cc2a3dc73 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "10.3.52", + "version": "10.3.53", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.52", + "@workday/canvas-kit-react": "^10.3.53", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index d51f08607a..a70e12e768 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "10.3.52", + "version": "10.3.53", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index 4f31f730ff..beccbb37bd 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "10.3.52", + "version": "10.3.53", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -47,8 +47,8 @@ "@emotion/is-prop-valid": "^1.1.1", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.52", - "@workday/canvas-kit-styling": "^10.3.52", + "@workday/canvas-kit-react": "^10.3.53", + "@workday/canvas-kit-styling": "^10.3.53", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index 172ecb88e2..07cbf9b41f 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "10.3.52", + "version": "10.3.53", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 388150c555..5c2c4df9a7 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "10.3.52", + "version": "10.3.53", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^10.3.52", - "@workday/canvas-kit-styling": "^10.3.52", + "@workday/canvas-kit-popup-stack": "^10.3.53", + "@workday/canvas-kit-styling": "^10.3.53", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^1.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index 56be16fd08..763f1065fe 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "10.3.52", + "version": "10.3.53", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^10.3.52", + "@workday/canvas-kit-styling": "^10.3.53", "stylis": "4.0.13", "typescript": "4.2" }, diff --git a/modules/styling/package.json b/modules/styling/package.json index c0a4602519..8479bc33a0 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "10.3.52", + "version": "10.3.53", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^10.3.52", + "@workday/canvas-kit-react": "^10.3.53", "@workday/canvas-tokens-web": "^1.0.0", "typescript": "4.2" } From 9501a1050edfa01539684cc268044cb8fbce4e7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:38:22 -0600 Subject: [PATCH 23/26] chore(deps): Bump elliptic from 6.5.4 to 6.5.7 (#2875) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.4 to 6.5.7. [category:Dependencies] Co-authored-by: @dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c36dae900b..e046147177 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8027,9 +8027,9 @@ electron-to-chromium@^1.4.17: integrity sha512-XIvFB1omSAxYgHYX48sC+HR8i/p7lx7R+0cX9faElg1g++h9IilCrJ12+bQuY+d96Wp7zkBiJwMOv+AhLtLrTg== elliptic@^6.0.0, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + version "6.5.7" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" + integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== dependencies: bn.js "^4.11.9" brorand "^1.1.0" From 4c451241b63863e2d43cd7cd495e50f61488f3ab Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Tue, 20 Aug 2024 21:40:15 +0000 Subject: [PATCH 24/26] chore: Release v11.1.2 [skip release] --- CHANGELOG.md | 5 +++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 4 ++-- 14 files changed, 29 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6de811d702..92870420fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.1.2](https://github.com/Workday/canvas-kit/releases/tag/v11.1.2) (2024-08-20) + + + + ## [v11.1.1](https://github.com/Workday/canvas-kit/releases/tag/v11.1.1) (2024-08-20) ### Components diff --git a/lerna.json b/lerna.json index b6635ae372..2883cdb3dd 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.1.1", + "version": "11.1.2", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index 76046d8f63..a621af5deb 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.1.1", + "version": "11.1.2", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index 1e982fefcf..f5de169988 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.1.1", + "version": "11.1.2", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 1676101a52..3e792b0e2b 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.1.1", + "version": "11.1.2", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.1.1", - "@workday/canvas-kit-preview-react": "^11.1.1", - "@workday/canvas-kit-react": "^11.1.1", - "@workday/canvas-kit-styling": "^11.1.1", + "@workday/canvas-kit-labs-react": "^11.1.2", + "@workday/canvas-kit-preview-react": "^11.1.2", + "@workday/canvas-kit-react": "^11.1.2", + "@workday/canvas-kit-styling": "^11.1.2", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 6f4b0a6763..86fbb37f38 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.1.1", + "version": "11.1.2", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 405b17dda8..825b88ec0b 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.1.1", + "version": "11.1.2", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.1", + "@workday/canvas-kit-react": "^11.1.2", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 0f7899ff5a..4762768357 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.1.1", + "version": "11.1.2", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index 04a357e966..d0c6b364cb 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.1.1", + "version": "11.1.2", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index b09f48cbf2..dca54f6d61 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.1.1", + "version": "11.1.2", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.1", - "@workday/canvas-kit-styling": "^11.1.1", + "@workday/canvas-kit-react": "^11.1.2", + "@workday/canvas-kit-styling": "^11.1.2", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index b6d7032f36..b4b75603f8 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.1.1", + "version": "11.1.2", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 79d821b555..7c83747027 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.1.1", + "version": "11.1.2", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.1.1", - "@workday/canvas-kit-styling": "^11.1.1", + "@workday/canvas-kit-popup-stack": "^11.1.2", + "@workday/canvas-kit-styling": "^11.1.2", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index e8ed7bf9b8..658d3a5b37 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.1.1", + "version": "11.1.2", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.1.1", + "@workday/canvas-kit-styling": "^11.1.2", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index 919fbb1e85..7805810b2b 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.1.1", + "version": "11.1.2", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,7 +53,7 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.1", + "@workday/canvas-kit-react": "^11.1.2", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" From 0ad69fbb1b6f416855fa2815f7c13ffee5deb53a Mon Sep 17 00:00:00 2001 From: alanbsmith Date: Tue, 20 Aug 2024 22:32:39 +0000 Subject: [PATCH 25/26] chore: Release v11.1.3 [skip release] --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- modules/codemod/package.json | 2 +- modules/css/package.json | 2 +- modules/docs/package.json | 10 +++++----- modules/labs-css/package.json | 2 +- modules/labs-react/package.json | 4 ++-- modules/popup-stack/package.json | 2 +- modules/preview-css/package.json | 2 +- modules/preview-react/package.json | 6 +++--- modules/react-fonts/package.json | 2 +- modules/react/package.json | 6 +++--- modules/styling-transform/package.json | 4 ++-- modules/styling/package.json | 6 +++--- 14 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e8c80d0da..cb5f9c3350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.1.3](https://github.com/Workday/canvas-kit/releases/tag/v11.1.3) (2024-08-20) + +### Components + +- fix: Update select to trigger onChange ([#2874](https://github.com/Workday/canvas-kit/pull/2874)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera) + + ## [v10.3.53](https://github.com/Workday/canvas-kit/releases/tag/v10.3.53) (2024-08-20) ### Components diff --git a/lerna.json b/lerna.json index 2883cdb3dd..7bbbe9ab5f 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "modules/**" ], - "version": "11.1.2", + "version": "11.1.3", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/modules/codemod/package.json b/modules/codemod/package.json index a621af5deb..7c67600f6d 100644 --- a/modules/codemod/package.json +++ b/modules/codemod/package.json @@ -2,7 +2,7 @@ "name": "@workday/canvas-kit-codemod", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", - "version": "11.1.2", + "version": "11.1.3", "description": "A collection of codemods for use on Workday Canvas Kit packages.", "main": "dist/es6/index.js", "sideEffects": false, diff --git a/modules/css/package.json b/modules/css/package.json index f5de169988..60e1ab50d5 100644 --- a/modules/css/package.json +++ b/modules/css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-css", - "version": "11.1.2", + "version": "11.1.3", "description": "The parent module that contains all Workday Canvas Kit CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/docs/package.json b/modules/docs/package.json index 3e792b0e2b..327fc2dd8f 100644 --- a/modules/docs/package.json +++ b/modules/docs/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-docs", - "version": "11.1.2", + "version": "11.1.3", "description": "Documentation components of Canvas Kit components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -44,10 +44,10 @@ "dependencies": { "@emotion/styled": "^11.6.0", "@storybook/csf": "0.0.1", - "@workday/canvas-kit-labs-react": "^11.1.2", - "@workday/canvas-kit-preview-react": "^11.1.2", - "@workday/canvas-kit-react": "^11.1.2", - "@workday/canvas-kit-styling": "^11.1.2", + "@workday/canvas-kit-labs-react": "^11.1.3", + "@workday/canvas-kit-preview-react": "^11.1.3", + "@workday/canvas-kit-react": "^11.1.3", + "@workday/canvas-kit-styling": "^11.1.3", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "markdown-to-jsx": "^7.2.0", diff --git a/modules/labs-css/package.json b/modules/labs-css/package.json index 86fbb37f38..b386edfd52 100644 --- a/modules/labs-css/package.json +++ b/modules/labs-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-css", - "version": "11.1.2", + "version": "11.1.3", "description": "The parent module that contains all Workday Canvas Kit Labs CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/labs-react/package.json b/modules/labs-react/package.json index 825b88ec0b..90337194ed 100644 --- a/modules/labs-react/package.json +++ b/modules/labs-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-labs-react", - "version": "11.1.2", + "version": "11.1.3", "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,7 +46,7 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.2", + "@workday/canvas-kit-react": "^11.1.3", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/design-assets-types": "^0.2.8", "chroma-js": "^2.1.0", diff --git a/modules/popup-stack/package.json b/modules/popup-stack/package.json index 4762768357..19ca479f24 100644 --- a/modules/popup-stack/package.json +++ b/modules/popup-stack/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-popup-stack", - "version": "11.1.2", + "version": "11.1.3", "description": "Stack for managing popup UIs to coordinate global concerns like escape key handling and rendering order", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-css/package.json b/modules/preview-css/package.json index d0c6b364cb..d85b74724a 100644 --- a/modules/preview-css/package.json +++ b/modules/preview-css/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-css", - "version": "11.1.2", + "version": "11.1.3", "description": "The parent module that contains all Workday Canvas Kit Preview CSS components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/preview-react/package.json b/modules/preview-react/package.json index dca54f6d61..d16802ea2a 100644 --- a/modules/preview-react/package.json +++ b/modules/preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-preview-react", - "version": "11.1.2", + "version": "11.1.3", "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "dependencies": { "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.2", - "@workday/canvas-kit-styling": "^11.1.2", + "@workday/canvas-kit-react": "^11.1.3", + "@workday/canvas-kit-styling": "^11.1.3", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8" diff --git a/modules/react-fonts/package.json b/modules/react-fonts/package.json index b4b75603f8..6acc37cd59 100644 --- a/modules/react-fonts/package.json +++ b/modules/react-fonts/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react-fonts", - "version": "11.1.2", + "version": "11.1.3", "description": "Fonts for canvas-kit-react", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", diff --git a/modules/react/package.json b/modules/react/package.json index 7c83747027..01a9ac8fbd 100644 --- a/modules/react/package.json +++ b/modules/react/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-react", - "version": "11.1.2", + "version": "11.1.3", "description": "The parent module that contains all Workday Canvas Kit React components", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -49,8 +49,8 @@ "@emotion/styled": "^11.6.0", "@popperjs/core": "^2.5.4", "@workday/canvas-colors-web": "^2.0.0", - "@workday/canvas-kit-popup-stack": "^11.1.2", - "@workday/canvas-kit-styling": "^11.1.2", + "@workday/canvas-kit-popup-stack": "^11.1.3", + "@workday/canvas-kit-styling": "^11.1.3", "@workday/canvas-system-icons-web": "^3.0.0", "@workday/canvas-tokens-web": "^2.0.0", "@workday/design-assets-types": "^0.2.8", diff --git a/modules/styling-transform/package.json b/modules/styling-transform/package.json index 658d3a5b37..ed45eb615b 100644 --- a/modules/styling-transform/package.json +++ b/modules/styling-transform/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling-transform", - "version": "11.1.2", + "version": "11.1.3", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -34,7 +34,7 @@ ], "dependencies": { "@emotion/serialize": "^1.0.2", - "@workday/canvas-kit-styling": "^11.1.2", + "@workday/canvas-kit-styling": "^11.1.3", "@workday/canvas-tokens-web": "^2.0.0", "stylis": "4.0.13", "typescript": "4.2" diff --git a/modules/styling/package.json b/modules/styling/package.json index e25cdfbc36..47b874712d 100644 --- a/modules/styling/package.json +++ b/modules/styling/package.json @@ -1,6 +1,6 @@ { "name": "@workday/canvas-kit-styling", - "version": "11.1.2", + "version": "11.1.3", "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS", "author": "Workday, Inc. (https://www.workday.com)", "license": "Apache-2.0", @@ -53,9 +53,9 @@ "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/styled": "^11.6.0", - "@workday/canvas-kit-react": "^11.1.2", - "@workday/canvas-tokens-web": "^2.0.0", + "@workday/canvas-kit-react": "^11.1.3", "@workday/canvas-system-icons-web": "^3.0.0", + "@workday/canvas-tokens-web": "^2.0.0", "typescript": "4.2" } } From 7f377cda55d97a1844e4f152fec5fa4edb9da89e Mon Sep 17 00:00:00 2001 From: "manuel.carrera" Date: Wed, 21 Aug 2024 09:13:26 -0600 Subject: [PATCH 26/26] chore: Merge prerelease/minor into prerelease/major --- modules/preview-react/divider/stories/examples/Basic.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/preview-react/divider/stories/examples/Basic.tsx b/modules/preview-react/divider/stories/examples/Basic.tsx index df1fd32eb2..15d4034f48 100644 --- a/modules/preview-react/divider/stories/examples/Basic.tsx +++ b/modules/preview-react/divider/stories/examples/Basic.tsx @@ -94,7 +94,7 @@ interface ProfileCardProps { const ProfileCard = ({id, name, bio}: ProfileCardProps) => (