Skip to content

Commit

Permalink
Merge branch 'main' into 18187-fix-drag-outside-closes-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
vsvsv authored Dec 3, 2024
2 parents 79c081d + cdf16cd commit 4e841e0
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 44 deletions.
4 changes: 2 additions & 2 deletions examples/class-prefix/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "class-prefix",
"private": true,
"version": "0.68.0",
"version": "0.69.0-rc.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/codesandbox-styles/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "codesandbox-styles",
"private": true,
"version": "0.73.0",
"version": "0.74.0-rc.0",
"type": "module",
"scripts": {
"dev": "vite"
Expand All @@ -11,6 +11,6 @@
"vite": "^4.3.8"
},
"dependencies": {
"@carbon/styles": "^1.70.0"
"@carbon/styles": "^1.71.0-rc.0"
}
}
4 changes: 2 additions & 2 deletions examples/custom-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "custom-theme",
"private": true,
"version": "0.69.0",
"version": "0.70.0-rc.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/id-prefix/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "id-prefix",
"private": true,
"version": "0.68.0",
"version": "0.69.0-rc.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/light-dark-mode/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "examples-light-dark",
"private": true,
"version": "0.69.0",
"version": "0.70.0-rc.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"next": "14.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "examples-nextjs",
"private": true,
"version": "0.71.0",
"version": "0.72.0-rc.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"next": "14.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/v10-token-compat-in-v11/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "v10-token-compat-in-v11",
"private": true,
"version": "0.69.0",
"version": "0.70.0-rc.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "vite",
"private": true,
"version": "0.69.0",
"version": "0.70.0-rc.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "carbon-components-react",
"private": true,
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences. This package reached end of support on September 30, 2024 and will not receive any more updates.",
"version": "8.71.0",
"version": "8.72.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -43,8 +43,8 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/styles": "^1.70.0",
"@carbon/react": "^1.72.0-rc.0",
"@carbon/styles": "^1.71.0-rc.0",
"@ibm/telemetry-js": "^1.5.0",
"chalk": "1.1.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/carbon-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "carbon-components",
"private": true,
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences. This package reached end of support on September 30, 2024 and will not receive any more updates.",
"version": "11.70.0",
"version": "11.71.0-rc.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,7 +44,7 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/styles": "^1.70.0",
"@carbon/styles": "^1.71.0-rc.0",
"@ibm/telemetry-js": "^1.5.0",
"chalk": "1.1.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/react",
"description": "React components for the Carbon Design System",
"version": "1.71.0",
"version": "1.72.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -52,7 +52,7 @@
"@carbon/feature-flags": "^0.24.0",
"@carbon/icons-react": "^11.53.0",
"@carbon/layout": "^11.28.0",
"@carbon/styles": "^1.70.0",
"@carbon/styles": "^1.71.0-rc.0",
"@floating-ui/react": "^0.26.0",
"@ibm/telemetry-js": "^1.5.0",
"classnames": "2.5.1",
Expand Down
19 changes: 19 additions & 0 deletions packages/react/src/components/ModalWrapper/ModalWrapper-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,24 @@ describe('ModalWrapper', () => {
expect(screen.getByTestId('modal-2')).not.toHaveClass('is-visible');
});

it('should call onKeyDown with escape', async () => {
const onKeyDown = jest.fn();
render(
<ModalWrapper
buttonTriggerText="Launch modal"
modalHeading="Modal heading"
modalLabel="Label"
data-testid="modal-2"
onKeyDown={onKeyDown}>
<p>Modal content here</p>
</ModalWrapper>
);

await userEvent.tab();
await userEvent.keyboard('{Escape}');
expect(onKeyDown).toHaveBeenCalledTimes(1);
});

it('should set open state to false when close button is clicked', async () => {
render(
<ModalWrapper
Expand Down Expand Up @@ -149,6 +167,7 @@ describe('ModalWrapper', () => {
modalHeading="Modal heading"
modalLabel="Label"
handleSubmit={handleSubmit}
shouldCloseAfterSubmit
open
data-testid="modal-5">
<p>Modal content here</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/styles",
"description": "Styles for the Carbon Design System",
"version": "1.70.0",
"version": "1.71.0-rc.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/web-components",
"description": "Web components for the Carbon Design System",
"version": "2.18.0",
"version": "2.19.0-rc.0",
"license": "Apache-2.0",
"main": "es/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -67,7 +67,7 @@
"wca": "web-component-analyzer analyze src --outFile custom-elements.json"
},
"dependencies": {
"@carbon/styles": "^1.70.0",
"@carbon/styles": "^1.71.0-rc.0",
"@floating-ui/dom": "^1.6.3",
"@ibm/telemetry-js": "^1.5.0",
"flatpickr": "4.6.13",
Expand Down
4 changes: 2 additions & 2 deletions www/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "www",
"private": true,
"version": "0.80.0",
"version": "0.81.0-rc.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -22,7 +22,7 @@
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.71.0",
"@carbon/react": "^1.72.0-rc.0",
"@octokit/core": "^4.0.0",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^4.0.0",
Expand Down
Loading

0 comments on commit 4e841e0

Please sign in to comment.