diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml
index 7b298d58080a..dd222493f773 100644
--- a/.github/workflows/add-to-project.yml
+++ b/.github/workflows/add-to-project.yml
@@ -21,7 +21,7 @@ jobs:
name: Add issue with enhancement label to the Proposals project
runs-on: ubuntu-latest
steps:
- - uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
+ - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
labeled: ${{ env.LABEL_ENHANCEMENT }}
project-url: ${{ env.PROPOSALS_PROJECT_URL }}
@@ -31,7 +31,7 @@ jobs:
name: Add issue with typescript label to the TypeScript Adoption project
runs-on: ubuntu-latest
steps:
- - uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
+ - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
labeled: ${{ env.LABEL_TYPESCRIPT }}
project-url: ${{ env.TYPESCRIPT_PROJECT_URL }}
@@ -41,7 +41,7 @@ jobs:
name: Add issue with AI4UX label to the AI4UX project
runs-on: ubuntu-latest
steps:
- - uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
+ - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
labeled: ${{ env.LABEL_AI4UX }}
project-url: ${{ env.AI4UX_PROJECT_URL }}
@@ -51,7 +51,7 @@ jobs:
name: Add issue to the Design System project
runs-on: ubuntu-latest
steps:
- - uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
+ - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
labeled: ${{ env.LABEL_ENHANCEMENT }}, ${{ env.LABEL_TYPESCRIPT }}
label-operator: NOT
diff --git a/examples/class-prefix/package.json b/examples/class-prefix/package.json
index ef05d3c3538f..8f8ff3f97f6e 100644
--- a/examples/class-prefix/package.json
+++ b/examples/class-prefix/package.json
@@ -1,7 +1,7 @@
{
"name": "class-prefix",
"private": true,
- "version": "0.58.0-rc.0",
+ "version": "0.58.0-rc.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
diff --git a/examples/custom-theme/package.json b/examples/custom-theme/package.json
index fa4850c15bab..b4560425f6e1 100644
--- a/examples/custom-theme/package.json
+++ b/examples/custom-theme/package.json
@@ -1,7 +1,7 @@
{
"name": "custom-theme",
"private": true,
- "version": "0.59.0-rc.0",
+ "version": "0.59.0-rc.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
diff --git a/examples/id-prefix/package.json b/examples/id-prefix/package.json
index f3d71868a201..405fe0fbbc05 100644
--- a/examples/id-prefix/package.json
+++ b/examples/id-prefix/package.json
@@ -1,7 +1,7 @@
{
"name": "id-prefix",
"private": true,
- "version": "0.58.0-rc.0",
+ "version": "0.58.0-rc.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
diff --git a/examples/light-dark-mode/package.json b/examples/light-dark-mode/package.json
index 6857a6706403..688f1c2eff94 100644
--- a/examples/light-dark-mode/package.json
+++ b/examples/light-dark-mode/package.json
@@ -1,7 +1,7 @@
{
"name": "examples-light-dark",
"private": true,
- "version": "0.59.0-rc.0",
+ "version": "0.59.0-rc.1",
"scripts": {
"build": "next build",
"dev": "next dev",
@@ -9,7 +9,7 @@
"start": "next start"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"next": "14.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json
index dee0c7292db0..385f5ba505d0 100644
--- a/examples/nextjs/package.json
+++ b/examples/nextjs/package.json
@@ -1,7 +1,7 @@
{
"name": "examples-nextjs",
"private": true,
- "version": "0.61.0-rc.0",
+ "version": "0.61.0-rc.1",
"scripts": {
"build": "next build",
"dev": "next dev",
@@ -9,7 +9,7 @@
"start": "next start"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"next": "14.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
diff --git a/examples/v10-token-compat-in-v11/package.json b/examples/v10-token-compat-in-v11/package.json
index 1794492b9f3c..0b67e3cfab18 100644
--- a/examples/v10-token-compat-in-v11/package.json
+++ b/examples/v10-token-compat-in-v11/package.json
@@ -1,7 +1,7 @@
{
"name": "v10-token-compat-in-v11",
"private": true,
- "version": "0.59.0-rc.0",
+ "version": "0.59.0-rc.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
diff --git a/examples/vite/package.json b/examples/vite/package.json
index 108695bc0a27..806b761d1b41 100644
--- a/examples/vite/package.json
+++ b/examples/vite/package.json
@@ -1,7 +1,7 @@
{
"name": "vite",
"private": true,
- "version": "0.59.0-rc.0",
+ "version": "0.59.0-rc.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
diff --git a/packages/carbon-components-react/package.json b/packages/carbon-components-react/package.json
index 8a710cc7019d..8af16e266725 100644
--- a/packages/carbon-components-react/package.json
+++ b/packages/carbon-components-react/package.json
@@ -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.61.0-rc.0",
+ "version": "8.61.0-rc.1",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
@@ -42,7 +42,7 @@
"sass": "^1.33.0"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"@carbon/styles": "^1.61.0-rc.0",
"@ibm/telemetry-js": "^1.5.0",
"chalk": "1.1.3"
diff --git a/packages/react/package.json b/packages/react/package.json
index ad3738f652cd..3ef35207cde7 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -1,7 +1,7 @@
{
"name": "@carbon/react",
"description": "React components for the Carbon Design System",
- "version": "1.61.0-rc.0",
+ "version": "1.61.0-rc.1",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
diff --git a/packages/react/src/components/Pagination/Pagination-test.js b/packages/react/src/components/Pagination/Pagination-test.js
index 508a9b3f16e1..9834c5db3162 100644
--- a/packages/react/src/components/Pagination/Pagination-test.js
+++ b/packages/react/src/components/Pagination/Pagination-test.js
@@ -221,5 +221,18 @@ describe('Pagination', () => {
document.querySelector('.cds--select__page-number')
).not.toBeInTheDocument();
});
+
+ it('should handle zero total items', () => {
+ render(
+
+ );
+
+ expect(screen.getByText('0–0 of 0 items')).toBeInTheDocument();
+ });
});
});
diff --git a/packages/react/src/components/Pagination/Pagination.tsx b/packages/react/src/components/Pagination/Pagination.tsx
index f8969cc9c53d..303e76f376ca 100644
--- a/packages/react/src/components/Pagination/Pagination.tsx
+++ b/packages/react/src/components/Pagination/Pagination.tsx
@@ -218,7 +218,7 @@ const Pagination = React.forwardRef(function Pagination(
});
const totalPages = totalItems
? Math.max(Math.ceil(totalItems / pageSize), 1)
- : NaN;
+ : 1;
const backButtonDisabled = disabled || page === 1;
const backButtonClasses = cx({
[`${prefix}--pagination__button`]: true,
@@ -366,7 +366,9 @@ const Pagination = React.forwardRef(function Pagination(
{pagesUnknown || !totalItems
- ? itemText(pageSize * (page - 1) + 1, page * pageSize)
+ ? totalItems === 0
+ ? itemRangeText(0, 0, 0)
+ : itemText(pageSize * (page - 1) + 1, page * pageSize)
: itemRangeText(
Math.min(pageSize * (page - 1) + 1, totalItems),
Math.min(page * pageSize, totalItems),
diff --git a/www/package.json b/www/package.json
index ed6a1bd7c26d..ca0a43981d66 100644
--- a/www/package.json
+++ b/www/package.json
@@ -1,7 +1,7 @@
{
"name": "www",
"private": true,
- "version": "0.70.0-rc.0",
+ "version": "0.70.0-rc.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -22,7 +22,7 @@
"start": "next start"
},
"dependencies": {
- "@carbon/react": "^1.61.0-rc.0",
+ "@carbon/react": "^1.61.0-rc.1",
"@octokit/core": "^4.0.0",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^4.0.0",
diff --git a/yarn.lock b/yarn.lock
index e35ff276bf7b..ca6d6418f0ca 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2016,7 +2016,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@carbon/react@npm:^1.61.0-rc.0, @carbon/react@workspace:packages/react":
+"@carbon/react@npm:^1.61.0-rc.1, @carbon/react@workspace:packages/react":
version: 0.0.0-use.local
resolution: "@carbon/react@workspace:packages/react"
dependencies:
@@ -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.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@carbon/styles": "npm:^1.61.0-rc.0"
"@carbon/test-utils": "npm:^10.30.0"
"@ibm/telemetry-js": "npm:^1.5.0"
@@ -10279,7 +10279,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "class-prefix@workspace:examples/class-prefix"
dependencies:
- "@carbon/react": "npm:^1.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
@@ -11652,7 +11652,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "custom-theme@workspace:examples/custom-theme"
dependencies:
- "@carbon/react": "npm:^1.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
@@ -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.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
eslint: "npm:8.40.0"
next: "npm:14.1.1"
react: "npm:18.2.0"
@@ -13839,7 +13839,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "examples-nextjs@workspace:examples/nextjs"
dependencies:
- "@carbon/react": "npm:^1.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
eslint: "npm:8.40.0"
eslint-config-next: "npm:13.4.7"
next: "npm:14.1.1"
@@ -16026,7 +16026,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "id-prefix@workspace:examples/id-prefix"
dependencies:
- "@carbon/react": "npm:^1.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
@@ -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.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
@@ -28038,7 +28038,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "vite@workspace:examples/vite"
dependencies:
- "@carbon/react": "npm:^1.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@vitejs/plugin-react": "npm:4.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
@@ -28599,7 +28599,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "www@workspace:www"
dependencies:
- "@carbon/react": "npm:^1.61.0-rc.0"
+ "@carbon/react": "npm:^1.61.0-rc.1"
"@octokit/core": "npm:^4.0.0"
"@octokit/plugin-retry": "npm:^3.0.9"
"@octokit/plugin-throttling": "npm:^4.0.0"