Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V11.62.1 - Patch #17013

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.59.0",
"version": "0.59.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
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.60.0",
"version": "0.60.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"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.59.0",
"version": "0.59.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"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.60.0",
"version": "0.60.1",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"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.62.0",
"version": "0.62.1",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"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.60.0",
"version": "0.60.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"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.60.0",
"version": "0.60.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/carbon-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "carbon-components-react",
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences.",
"version": "8.62.0",
"version": "8.62.1",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -42,7 +42,7 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"@carbon/styles": "^1.61.0",
"@ibm/telemetry-js": "^1.5.0",
"chalk": "1.1.3"
Expand Down
2 changes: 1 addition & 1 deletion 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.62.0",
"version": "1.62.1",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
14 changes: 10 additions & 4 deletions packages/react/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import React, {
MouseEvent,
ReactNode,
useEffect,
useMemo,
} from 'react';
import {
useSelect,
Expand Down Expand Up @@ -497,8 +498,13 @@ const Dropdown = React.forwardRef(
},
};

const menuProps = getMenuProps();
const menuRef = mergeRefs(menuProps.ref, refs.setFloating);
const menuProps = useMemo(
() =>
getMenuProps({
ref: autoAlign ? refs.setFloating : null,
}),
[autoAlign]
);

// Slug is always size `mini`
let normalizedSlug;
Expand Down Expand Up @@ -527,7 +533,7 @@ const Dropdown = React.forwardRef(
warnText={warnText}
light={light}
isOpen={isOpen}
ref={refs.setReference}
ref={autoAlign ? refs.setReference : null}
id={id}>
{invalid && (
<WarningFilled className={`${prefix}--list-box__invalid-icon`} />
Expand Down Expand Up @@ -567,7 +573,7 @@ const Dropdown = React.forwardRef(
/>
</button>
{normalizedSlug}
<ListBox.Menu {...menuProps} ref={menuRef}>
<ListBox.Menu {...menuProps}>
{isOpen &&
items.map((item, index) => {
const isObject = item !== null && typeof item === 'object';
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ const Menu = forwardRef<HTMLUListElement, MenuProps>(function Menu(
}

function focusItem(e?: React.KeyboardEvent<HTMLUListElement>) {
e?.preventDefault();
const currentItem = focusableItems.findIndex((item) =>
item.ref?.current?.contains(document.activeElement)
);
Expand Down
10 changes: 6 additions & 4 deletions packages/react/src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1217,10 +1217,12 @@ const Tab = forwardRef<HTMLElement, TabProps>(function Tab(
useLayoutEffect(() => {
function handler() {
const elementTabId = document.getElementById(`${id}`) || tabRef.current;
const newElement = elementTabId?.getElementsByClassName(
`${prefix}--tabs__nav-item-label`
)[0];
isEllipsisActive(newElement);
if (elementTabId?.closest(`.${prefix}--tabs--vertical`)) {
const newElement = elementTabId?.getElementsByClassName(
`${prefix}--tabs__nav-item-label`
)[0];
isEllipsisActive(newElement);
}
}
handler();
window.addEventListener('resize', handler);
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.71.0",
"version": "0.71.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -22,7 +22,7 @@
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.62.0",
"@carbon/react": "^1.62.1",
"@octokit/core": "^4.0.0",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^4.0.0",
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ __metadata:
languageName: unknown
linkType: soft

"@carbon/react@npm:^1.62.0, @carbon/react@workspace:packages/react":
"@carbon/react@npm:^1.62.1, @carbon/react@workspace:packages/react":
version: 0.0.0-use.local
resolution: "@carbon/react@workspace:packages/react"
dependencies:
Expand Down Expand Up @@ -9907,7 +9907,7 @@ __metadata:
"@babel/plugin-transform-react-constant-elements": "npm:^7.17.12"
"@babel/preset-env": "npm:^7.18.2"
"@babel/preset-react": "npm:^7.17.12"
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@carbon/styles": "npm:^1.61.0"
"@carbon/test-utils": "npm:^10.30.0"
"@ibm/telemetry-js": "npm:^1.5.0"
Expand Down Expand Up @@ -10279,7 +10279,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "class-prefix@workspace:examples/class-prefix"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -11652,7 +11652,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "custom-theme@workspace:examples/custom-theme"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -13826,7 +13826,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "examples-light-dark@workspace:examples/light-dark-mode"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
eslint: "npm:8.40.0"
next: "npm:14.1.1"
react: "npm:18.2.0"
Expand All @@ -13839,7 +13839,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "examples-nextjs@workspace:examples/nextjs"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
eslint: "npm:8.40.0"
eslint-config-next: "npm:13.4.7"
next: "npm:14.1.1"
Expand Down Expand Up @@ -16026,7 +16026,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "id-prefix@workspace:examples/id-prefix"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -27752,7 +27752,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "v10-token-compat-in-v11@workspace:examples/v10-token-compat-in-v11"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -28038,7 +28038,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "vite@workspace:examples/vite"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -28592,7 +28592,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "www@workspace:www"
dependencies:
"@carbon/react": "npm:^1.62.0"
"@carbon/react": "npm:^1.62.1"
"@octokit/core": "npm:^4.0.0"
"@octokit/plugin-retry": "npm:^3.0.9"
"@octokit/plugin-throttling": "npm:^4.0.0"
Expand Down
Loading