diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000000..324013595762 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,62 @@ +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true + +component_management: + default_rules: # default rules that will be inherited by all components + statuses: + - type: project # in this case every component that doens't have a status defined will have a project type one + target: auto + threshold: 1% + branches: + - '!main' + individual_components: + - component_id: colors + name: colors + paths: + - ../packages/colors/** + - component_id: feature-flags + name: feature-flags + paths: + - ../packages/feature-flags/** + - component_id: icon-build-helpers + name: icon-build-helpers + paths: + - ../packages/icon-build-helpers/** + - component_id: layout + name: layout + paths: + - ../packages/layout/** + - component_id: motion + name: motion + paths: + - ../packages/motion/** + - component_id: react # this is an identifier that should not be changed + name: react # this is a display name, and can be changed freely + paths: + - ../packages/react/** + - component_id: scss-generator + name: scss-generator + paths: + - ../packages/scss-generator/** + - component_id: test-utils + name: test-utils + paths: + - ../packages/test-utils/** + - component_id: themes + name: themes + paths: + - ../packages/themes/** + - component_id: type + name: type + paths: + - ../packages/type/** + - component_id: upgrade + name: upgrade + paths: + - ../packages/upgrade/** diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fb3e0ec4955..554faa2c3fdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,8 +79,11 @@ jobs: run: | yarn carbon-cli check --ignore '**/@(node_modules|examples|components|react|fixtures|compat)/**' 'packages/**/*.scss' - name: Run tests - run: yarn test --ci - + run: yarn test --ci --collectCoverage + - name: Upload coverage reports to Codecov with GitHub Action + uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} e2e: name: 'test:e2e' runs-on: ubuntu-latest diff --git a/.github/workflows/slack-office-hours-design.yml b/.github/workflows/slack-office-hours-design.yml index 14e25baac96c..8d8977b7b48a 100644 --- a/.github/workflows/slack-office-hours-design.yml +++ b/.github/workflows/slack-office-hours-design.yml @@ -70,7 +70,7 @@ jobs: "emoji": true }, "value": "click_me_123", - "url": "https://ec.yourlearning.ibm.com/w3/event/10408782", + "url": "https://ec.yourlearning.ibm.com/w3/event/10463103", "action_id": "button-action" } }, diff --git a/.github/workflows/slack-office-hours-dev.yml b/.github/workflows/slack-office-hours-dev.yml index e58ff9fbf766..b23419e71008 100644 --- a/.github/workflows/slack-office-hours-dev.yml +++ b/.github/workflows/slack-office-hours-dev.yml @@ -161,7 +161,100 @@ jobs: "emoji": true }, "value": "click_me_123", - "url": "https://ec.yourlearning.ibm.com/w3/enrollment/event/10322733", + "url": "https://ec.yourlearning.ibm.com/w3/enrollment/event/10408799", + "action_id": "button-action" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":memo: *Sign up to get help in a future session* :ibm-arrow-right::ibm-arrow-right::ibm-arrow-right:" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "View the agenda", + "emoji": true + }, + "value": "click_me_123", + "url": "https://ibm.biz/carbon-dev-office-hours", + "action_id": "button-action" + } + }, + { + "type": "divider" + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + + post-reminder-to-carbon-ibmproducts-pal-dev: + name: Post dev reminder to ibmproducts-pal-dev + runs-on: ubuntu-latest + steps: + - name: Send custom JSON data to Slack workflow + id: slack + uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + with: + payload: | + { + "username": "Carbon Design System", + "icon_url": "https://user-images.githubusercontent.com/3360588/192045905-5d9705af-92e2-4432-805e-15db98571e8b.png", + "channel": "#ibmproducts-pal-dev", + "text": "Join us for Carbon Developer Office Hours!", + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "Join us for Carbon Developer Office Hours!", + "emoji": true + } + }, + { + "type": "divider" + }, + { + "type": "image", + "image_url": "https://github.com/user-attachments/assets/e12fb5b9-9657-4e7b-b1a1-e1149cca8956", + "alt_text": "A terminal prompt symbol" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":thinking_face: _Are you running into a weird bug you can’t resolve?_ \n\n_:question: Do you have questions about using Carbon?_ \n\n :rocket: _Would you like to discuss migrating from v10 to v11?_" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Carbon developer office hours* are a bi-weekly opportunity to discuss topics like these and get help from the team. Developers from the Carbon team will be available to help and answer questions. While it's very informal, please be prepared to screen share and show your issue!" + } + }, + { + "type": "divider" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":yourlearning: *Subscribe and add to your calendar* :ibm-arrow-right::ibm-arrow-right::ibm-arrow-right:" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "Subscribe", + "emoji": true + }, + "value": "click_me_123", + "url": "https://ec.yourlearning.ibm.com/w3/enrollment/event/10408799", "action_id": "button-action" } }, diff --git a/.yarn/cache/@types-eslint-npm-8.2.1-221dc5a4f9-18a37197f2.zip b/.yarn/cache/@types-eslint-npm-8.2.1-221dc5a4f9-18a37197f2.zip deleted file mode 100644 index 01d25d3eecaa..000000000000 Binary files a/.yarn/cache/@types-eslint-npm-8.2.1-221dc5a4f9-18a37197f2.zip and /dev/null differ diff --git a/.yarn/cache/@types-eslint-scope-npm-3.7.3-e9b64dad2c-6772b05e1b.zip b/.yarn/cache/@types-eslint-scope-npm-3.7.3-e9b64dad2c-6772b05e1b.zip deleted file mode 100644 index c33bf3eaca28..000000000000 Binary files a/.yarn/cache/@types-eslint-scope-npm-3.7.3-e9b64dad2c-6772b05e1b.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-ast-npm-1.11.6-d3fd2bb49a-4c1303971c.zip b/.yarn/cache/@webassemblyjs-ast-npm-1.11.6-d3fd2bb49a-4c1303971c.zip deleted file mode 100644 index e350ae63034c..000000000000 Binary files a/.yarn/cache/@webassemblyjs-ast-npm-1.11.6-d3fd2bb49a-4c1303971c.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-ast-npm-1.12.1-3ff9ea1c0e-a775b05594.zip b/.yarn/cache/@webassemblyjs-ast-npm-1.12.1-3ff9ea1c0e-a775b05594.zip new file mode 100644 index 000000000000..b83e0cc81c95 Binary files /dev/null and b/.yarn/cache/@webassemblyjs-ast-npm-1.12.1-3ff9ea1c0e-a775b05594.zip differ diff --git a/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.11.6-69996544b0-b14d0573bf.zip b/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.11.6-69996544b0-b14d0573bf.zip deleted file mode 100644 index 36784bfb1386..000000000000 Binary files a/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.11.6-69996544b0-b14d0573bf.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.12.1-d025434a45-1d8705daa4.zip b/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.12.1-d025434a45-1d8705daa4.zip new file mode 100644 index 000000000000..d7eccb73d4e6 Binary files /dev/null and b/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.12.1-d025434a45-1d8705daa4.zip differ diff --git a/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.11.6-344f8ff2af-38a615ab3d.zip b/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.11.6-344f8ff2af-38a615ab3d.zip deleted file mode 100644 index 51b0ac545384..000000000000 Binary files a/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.11.6-344f8ff2af-38a615ab3d.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.12.1-cd0e2f1eab-e91e6b2811.zip b/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.12.1-cd0e2f1eab-e91e6b2811.zip new file mode 100644 index 000000000000..a17936e54fbf Binary files /dev/null and b/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.12.1-cd0e2f1eab-e91e6b2811.zip differ diff --git a/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.11.6-8d2703f828-c168bfc6d0.zip b/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.11.6-8d2703f828-c168bfc6d0.zip deleted file mode 100644 index 304d57941844..000000000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.11.6-8d2703f828-c168bfc6d0.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.12.1-727bec592a-5678ae02db.zip b/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.12.1-727bec592a-5678ae02db.zip new file mode 100644 index 000000000000..3ed22347d9fd Binary files /dev/null and b/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.12.1-727bec592a-5678ae02db.zip differ diff --git a/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.11.6-0ca036cab0-f91903506c.zip b/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.11.6-0ca036cab0-f91903506c.zip deleted file mode 100644 index 0074237908f4..000000000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.11.6-0ca036cab0-f91903506c.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.12.1-bbe22ad265-ec45bd50e8.zip b/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.12.1-bbe22ad265-ec45bd50e8.zip new file mode 100644 index 000000000000..f7fe6004bf6f Binary files /dev/null and b/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.12.1-bbe22ad265-ec45bd50e8.zip differ diff --git a/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.11.6-8be3443975-e0cfeea381.zip b/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.11.6-8be3443975-e0cfeea381.zip deleted file mode 100644 index a01f930a526a..000000000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.11.6-8be3443975-e0cfeea381.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.12.1-450c932de6-21f25ae109.zip b/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.12.1-450c932de6-21f25ae109.zip new file mode 100644 index 000000000000..2acb870f1d8e Binary files /dev/null and b/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.12.1-450c932de6-21f25ae109.zip differ diff --git a/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.11.6-88e2433c21-6995e0b7b8.zip b/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.11.6-88e2433c21-6995e0b7b8.zip deleted file mode 100644 index 7b7ba0c5d8bd..000000000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.11.6-88e2433c21-6995e0b7b8.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.12.1-54a7a19806-f7311685b7.zip b/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.12.1-54a7a19806-f7311685b7.zip new file mode 100644 index 000000000000..bef03f214c87 Binary files /dev/null and b/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.12.1-54a7a19806-f7311685b7.zip differ diff --git a/.yarn/cache/@webassemblyjs-wast-printer-npm-1.11.6-3191861e3f-fd45fd0d69.zip b/.yarn/cache/@webassemblyjs-wast-printer-npm-1.11.6-3191861e3f-fd45fd0d69.zip deleted file mode 100644 index 6878bc6830dc..000000000000 Binary files a/.yarn/cache/@webassemblyjs-wast-printer-npm-1.11.6-3191861e3f-fd45fd0d69.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wast-printer-npm-1.12.1-e75655c7ff-1a6a4b6bc4.zip b/.yarn/cache/@webassemblyjs-wast-printer-npm-1.12.1-e75655c7ff-1a6a4b6bc4.zip new file mode 100644 index 000000000000..a9fadd958876 Binary files /dev/null and b/.yarn/cache/@webassemblyjs-wast-printer-npm-1.12.1-e75655c7ff-1a6a4b6bc4.zip differ diff --git a/.yarn/cache/acorn-import-assertions-npm-1.9.0-22f56507c7-af8dd58f6b.zip b/.yarn/cache/acorn-import-assertions-npm-1.9.0-22f56507c7-af8dd58f6b.zip deleted file mode 100644 index 96e35de7bb85..000000000000 Binary files a/.yarn/cache/acorn-import-assertions-npm-1.9.0-22f56507c7-af8dd58f6b.zip and /dev/null differ diff --git a/.yarn/cache/acorn-import-attributes-npm-1.9.5-d1e666eb35-8bfbfbb6e2.zip b/.yarn/cache/acorn-import-attributes-npm-1.9.5-d1e666eb35-8bfbfbb6e2.zip new file mode 100644 index 000000000000..9a210b13dba8 Binary files /dev/null and b/.yarn/cache/acorn-import-attributes-npm-1.9.5-d1e666eb35-8bfbfbb6e2.zip differ diff --git a/.yarn/cache/terser-webpack-plugin-npm-5.3.10-3bde1920fb-fb1c2436ae.zip b/.yarn/cache/terser-webpack-plugin-npm-5.3.10-3bde1920fb-fb1c2436ae.zip new file mode 100644 index 000000000000..d2b8871f542b Binary files /dev/null and b/.yarn/cache/terser-webpack-plugin-npm-5.3.10-3bde1920fb-fb1c2436ae.zip differ diff --git a/.yarn/cache/terser-webpack-plugin-npm-5.3.9-7ba1eb45f4-339737a407.zip b/.yarn/cache/terser-webpack-plugin-npm-5.3.9-7ba1eb45f4-339737a407.zip deleted file mode 100644 index 89a312f24993..000000000000 Binary files a/.yarn/cache/terser-webpack-plugin-npm-5.3.9-7ba1eb45f4-339737a407.zip and /dev/null differ diff --git a/.yarn/cache/watchpack-npm-2.4.0-7ec4b9cc65-4280b45bc4.zip b/.yarn/cache/watchpack-npm-2.4.0-7ec4b9cc65-4280b45bc4.zip deleted file mode 100644 index ef42a75c32ea..000000000000 Binary files a/.yarn/cache/watchpack-npm-2.4.0-7ec4b9cc65-4280b45bc4.zip and /dev/null differ diff --git a/.yarn/cache/watchpack-npm-2.4.2-3e587d5d5b-6bd4c051d9.zip b/.yarn/cache/watchpack-npm-2.4.2-3e587d5d5b-6bd4c051d9.zip new file mode 100644 index 000000000000..f5cc36805a22 Binary files /dev/null and b/.yarn/cache/watchpack-npm-2.4.2-3e587d5d5b-6bd4c051d9.zip differ diff --git a/.yarn/cache/webpack-npm-5.84.1-067c8dfc81-d72bf7a8ce.zip b/.yarn/cache/webpack-npm-5.84.1-067c8dfc81-d72bf7a8ce.zip deleted file mode 100644 index 2b374c30ceb0..000000000000 Binary files a/.yarn/cache/webpack-npm-5.84.1-067c8dfc81-d72bf7a8ce.zip and /dev/null differ diff --git a/.yarn/cache/webpack-npm-5.94.0-d1e43de389-648449c5fb.zip b/.yarn/cache/webpack-npm-5.94.0-d1e43de389-648449c5fb.zip new file mode 100644 index 000000000000..441f0ab80bd7 Binary files /dev/null and b/.yarn/cache/webpack-npm-5.94.0-d1e43de389-648449c5fb.zip differ diff --git a/config/eslint-config-carbon/package.json b/config/eslint-config-carbon/package.json index 07b6d6aea1ea..18d4699cf0ef 100644 --- a/config/eslint-config-carbon/package.json +++ b/config/eslint-config-carbon/package.json @@ -1,7 +1,7 @@ { "name": "eslint-config-carbon", "description": "ESLint configuration for Carbon", - "version": "3.16.0-rc.0", + "version": "3.16.0", "license": "Apache-2.0", "main": "index.js", "repository": { diff --git a/config/jest-config-carbon/package.json b/config/jest-config-carbon/package.json index 8891dcfc2d3c..642628f9d6af 100644 --- a/config/jest-config-carbon/package.json +++ b/config/jest-config-carbon/package.json @@ -2,7 +2,7 @@ "name": "jest-config-carbon", "private": true, "description": "Jest configuration and preset for Carbon", - "version": "1.15.0-rc.0", + "version": "1.15.0", "license": "Apache-2.0", "main": "index.js", "repository": { diff --git a/config/stylelint-config-carbon/package.json b/config/stylelint-config-carbon/package.json index 7aa8aae5501c..3df5734cbca0 100644 --- a/config/stylelint-config-carbon/package.json +++ b/config/stylelint-config-carbon/package.json @@ -1,7 +1,7 @@ { "name": "stylelint-config-carbon", "description": "Stylelint configuration for Carbon", - "version": "1.18.0-rc.0", + "version": "1.18.0", "license": "Apache-2.0", "main": "index.js", "repository": { diff --git a/e2e/components/InteractiveTag/InteractiveTag-test.avt.e2e.js b/e2e/components/InteractiveTag/InteractiveTag-test.avt.e2e.js index 992826fa58ad..406818fc503a 100644 --- a/e2e/components/InteractiveTag/InteractiveTag-test.avt.e2e.js +++ b/e2e/components/InteractiveTag/InteractiveTag-test.avt.e2e.js @@ -53,12 +53,30 @@ test.describe('@avt InteractiveTag', () => { theme: 'white', }, }); + await expect( + page.getByText('Tag content with a long text description').first() + ).toBeVisible(); + const tooltip = page.getByRole('tooltip'); - const button = page.getByRole('button').first(); + const button = page.getByRole('button').nth(1); await expect(button).toBeVisible(); await page.keyboard.press('Tab'); + await page.keyboard.press('Tab'); await expect(button).toBeFocused(); await expect(tooltip).toHaveAttribute('aria-hidden', 'false'); + + // Test dismissible functionality + await page.keyboard.press('Enter'); + await expect( + page.getByText('Tag content with a long text description') + ).not.toBeVisible(); + + // Reset button click + await page.keyboard.press('Shift+Tab'); + await page.keyboard.press('Enter'); + await expect( + page.getByText('Tag content with a long text description').first() + ).toBeVisible(); }); test('@avt-keyboard-nav OperationalTag', async ({ page }) => { diff --git a/examples/class-prefix/package.json b/examples/class-prefix/package.json index 811c8708d0ec..11f0a426fb42 100644 --- a/examples/class-prefix/package.json +++ b/examples/class-prefix/package.json @@ -1,7 +1,7 @@ { "name": "class-prefix", "private": true, - "version": "0.63.0-rc.0", + "version": "0.63.0", "type": "module", "scripts": { "dev": "vite", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/examples/codesandbox-styles/package.json b/examples/codesandbox-styles/package.json index acd361ef8f16..4ff542c72280 100644 --- a/examples/codesandbox-styles/package.json +++ b/examples/codesandbox-styles/package.json @@ -1,7 +1,7 @@ { "name": "codesandbox-styles", "private": true, - "version": "0.68.0-rc.0", + "version": "0.68.0", "type": "module", "scripts": { "dev": "vite" @@ -11,6 +11,6 @@ "vite": "^4.3.8" }, "dependencies": { - "@carbon/styles": "^1.65.0-rc.0" + "@carbon/styles": "^1.65.0" } } diff --git a/examples/custom-theme/package.json b/examples/custom-theme/package.json index 5f9c3eb5ac8a..162f51745634 100644 --- a/examples/custom-theme/package.json +++ b/examples/custom-theme/package.json @@ -1,7 +1,7 @@ { "name": "custom-theme", "private": true, - "version": "0.64.0-rc.0", + "version": "0.64.0", "type": "module", "scripts": { "dev": "vite", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/examples/id-prefix/package.json b/examples/id-prefix/package.json index 1461abef9cd2..c8f5a4c8e898 100644 --- a/examples/id-prefix/package.json +++ b/examples/id-prefix/package.json @@ -1,7 +1,7 @@ { "name": "id-prefix", "private": true, - "version": "0.63.0-rc.0", + "version": "0.63.0", "type": "module", "scripts": { "dev": "vite", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "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 3681b44176cb..fdc8146302b4 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.64.0-rc.0", + "version": "0.64.0", "scripts": { "build": "next build", "dev": "next dev", @@ -9,7 +9,7 @@ "start": "next start" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "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 1d9a8e9fcbd5..42e941c879c3 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -1,7 +1,7 @@ { "name": "examples-nextjs", "private": true, - "version": "0.66.0-rc.0", + "version": "0.66.0", "scripts": { "build": "next build", "dev": "next dev", @@ -9,7 +9,7 @@ "start": "next start" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "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 86b1e81e4d50..ec0b80cbe4fd 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.64.0-rc.0", + "version": "0.64.0", "type": "module", "scripts": { "dev": "vite", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/examples/vite/package.json b/examples/vite/package.json index 5d316b156f7d..8efd3e7cd449 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -1,7 +1,7 @@ { "name": "vite", "private": true, - "version": "0.64.0-rc.0", + "version": "0.64.0", "type": "module", "scripts": { "dev": "vite", @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", + "@carbon/react": "^1.66.0", "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 9fedd93815fd..33b9ff9cda48 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.66.0-rc.0", + "version": "8.66.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -42,8 +42,8 @@ "sass": "^1.33.0" }, "dependencies": { - "@carbon/react": "^1.66.0-rc.0", - "@carbon/styles": "^1.65.0-rc.0", + "@carbon/react": "^1.66.0", + "@carbon/styles": "^1.65.0", "@ibm/telemetry-js": "^1.5.0", "chalk": "1.1.3" }, @@ -55,7 +55,7 @@ "@babel/plugin-transform-react-constant-elements": "^7.24.7", "@babel/preset-env": "^7.24.7", "@babel/preset-react": "^7.24.7", - "@carbon/test-utils": "^10.32.0-rc.0", + "@carbon/test-utils": "^10.32.0", "@rollup/plugin-babel": "^6.0.0", "@rollup/plugin-commonjs": "^26.0.0", "@rollup/plugin-node-resolve": "^15.0.0", diff --git a/packages/carbon-components/package.json b/packages/carbon-components/package.json index b6b431e20f74..dab9d34caf64 100644 --- a/packages/carbon-components/package.json +++ b/packages/carbon-components/package.json @@ -1,7 +1,7 @@ { "name": "carbon-components", "description": "The Carbon Design System is IBM’s open-source design system for products and experiences.", - "version": "11.65.0-rc.0", + "version": "11.65.0", "license": "Apache-2.0", "repository": { "type": "git", @@ -43,12 +43,12 @@ "sass": "^1.33.0" }, "dependencies": { - "@carbon/styles": "^1.65.0-rc.0", + "@carbon/styles": "^1.65.0", "@ibm/telemetry-js": "^1.5.0", "chalk": "1.1.3" }, "devDependencies": { - "@carbon/test-utils": "^10.32.0-rc.0", + "@carbon/test-utils": "^10.32.0", "fs-extra": "^11.0.0", "rimraf": "^6.0.0", "sass": "^1.77.7" diff --git a/packages/cli/package.json b/packages/cli/package.json index 7b24a231c068..42d25a955284 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/cli", "description": "Task automation for working with the Carbon Design System", - "version": "11.21.0-rc.0", + "version": "11.21.0", "license": "Apache-2.0", "bin": { "carbon-cli": "./bin/carbon-cli.js" diff --git a/packages/colors/package.json b/packages/colors/package.json index 9133b3ac8d01..0cf154a58b01 100644 --- a/packages/colors/package.json +++ b/packages/colors/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/colors", "description": "Colors for digital and software products using the Carbon Design System", - "version": "11.26.0-rc.0", + "version": "11.26.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -39,10 +39,10 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", + "@carbon/cli": "^11.21.0", "@carbon/cli-reporter": "^10.7.0", "@carbon/scss-generator": "^10.18.0", - "@carbon/test-utils": "^10.32.0-rc.0", + "@carbon/test-utils": "^10.32.0", "change-case": "^4.1.1", "fs-extra": "^11.0.0", "rimraf": "^6.0.0" diff --git a/packages/elements/package.json b/packages/elements/package.json index 748acf5d7b1b..64a2510d857a 100644 --- a/packages/elements/package.json +++ b/packages/elements/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/elements", "description": "A collection of design elements in code for the IBM Design Language", - "version": "11.53.0-rc.0", + "version": "11.53.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -38,17 +38,17 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "dependencies": { - "@carbon/colors": "^11.26.0-rc.0", - "@carbon/grid": "^11.27.0-rc.0", - "@carbon/icons": "^11.49.0-rc.0", - "@carbon/layout": "^11.26.0-rc.0", - "@carbon/motion": "^11.22.0-rc.0", - "@carbon/themes": "^11.40.0-rc.0", - "@carbon/type": "^11.31.0-rc.0", + "@carbon/colors": "^11.26.0", + "@carbon/grid": "^11.27.0", + "@carbon/icons": "^11.49.0", + "@carbon/layout": "^11.26.0", + "@carbon/motion": "^11.22.0", + "@carbon/themes": "^11.40.0", + "@carbon/type": "^11.31.0", "@ibm/telemetry-js": "^1.5.0" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", + "@carbon/cli": "^11.21.0", "fs-extra": "^11.0.0", "klaw-sync": "^6.0.0", "replace-in-file": "^7.0.0", diff --git a/packages/grid/package.json b/packages/grid/package.json index b246bb4603fb..6237e55282d6 100644 --- a/packages/grid/package.json +++ b/packages/grid/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/grid", "description": "Grid for digital and software products using the Carbon Design System", - "version": "11.27.0-rc.0", + "version": "11.27.0", "license": "Apache-2.0", "repository": { "type": "git", @@ -35,11 +35,11 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "dependencies": { - "@carbon/layout": "^11.26.0-rc.0", + "@carbon/layout": "^11.26.0", "@ibm/telemetry-js": "^1.5.0" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", + "@carbon/cli": "^11.21.0", "rimraf": "^6.0.0" }, "eyeglass": { diff --git a/packages/icon-build-helpers/package.json b/packages/icon-build-helpers/package.json index 094a82080df5..2727d36cddd7 100644 --- a/packages/icon-build-helpers/package.json +++ b/packages/icon-build-helpers/package.json @@ -2,7 +2,7 @@ "name": "@carbon/icon-build-helpers", "private": true, "description": "Build helpers for the Carbon Design System icon library", - "version": "1.30.0-rc.0", + "version": "1.30.0", "license": "Apache-2.0", "main": "src/index.js", "repository": { @@ -30,7 +30,7 @@ "@babel/template": "^7.24.7", "@babel/types": "^7.24.7", "@carbon/cli-reporter": "^10.7.0", - "@carbon/icon-helpers": "^10.52.0-rc.0", + "@carbon/icon-helpers": "^10.52.0", "@hapi/joi": "^17.1.1", "@rollup/plugin-babel": "^6.0.0", "@rollup/plugin-replace": "^5.0.0", diff --git a/packages/icon-helpers/package.json b/packages/icon-helpers/package.json index 093ffef83af8..4d48c9869d79 100644 --- a/packages/icon-helpers/package.json +++ b/packages/icon-helpers/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/icon-helpers", "description": "Helpers used alongside icons for digital and software products using the Carbon Design System", - "version": "10.52.0-rc.0", + "version": "10.52.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -36,7 +36,7 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", + "@carbon/cli": "^11.21.0", "rimraf": "^6.0.0", "typescript-config-carbon": "^0.3.0" }, diff --git a/packages/icons-react/package.json b/packages/icons-react/package.json index 7553ce46c6c3..00c5b159e85e 100644 --- a/packages/icons-react/package.json +++ b/packages/icons-react/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/icons-react", "description": "React components for icons in digital and software products using the Carbon Design System", - "version": "11.49.0-rc.0", + "version": "11.49.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -38,13 +38,13 @@ "react": ">=16" }, "dependencies": { - "@carbon/icon-helpers": "^10.52.0-rc.0", + "@carbon/icon-helpers": "^10.52.0", "@ibm/telemetry-js": "^1.5.0", "prop-types": "^15.7.2" }, "devDependencies": { - "@carbon/icon-build-helpers": "^1.30.0-rc.0", - "@carbon/icons": "^11.49.0-rc.0", + "@carbon/icon-build-helpers": "^1.30.0", + "@carbon/icons": "^11.49.0", "rimraf": "^6.0.0" }, "sideEffects": false diff --git a/packages/icons-vue/examples/storybook/yarn.lock b/packages/icons-vue/examples/storybook/yarn.lock index eaed01080c83..b0102b94368d 100644 --- a/packages/icons-vue/examples/storybook/yarn.lock +++ b/packages/icons-vue/examples/storybook/yarn.lock @@ -2125,10 +2125,10 @@ bn.js@^5.0.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -body-parser@1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== dependencies: bytes "3.1.2" content-type "~1.0.5" @@ -2138,7 +2138,7 @@ body-parser@1.20.2: http-errors "2.0.0" iconv-lite "0.4.24" on-finished "2.4.1" - qs "6.11.0" + qs "6.13.0" raw-body "2.5.2" type-is "~1.6.18" unpipe "1.0.0" @@ -2354,6 +2354,17 @@ call-bind@^1.0.0: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2895,6 +2906,15 @@ deep-equal@^1.0.1: resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3131,6 +3151,11 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" @@ -3192,6 +3217,18 @@ es-abstract@^1.10.0, es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.4. is-callable "^1.1.3" is-regex "^1.0.4" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-module-lexer@^1.2.1: version "1.5.4" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" @@ -3350,36 +3387,36 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: homedir-polyfill "^1.0.1" express@^4.16.3: - version "4.19.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" - integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== + version "4.20.0" + resolved "https://registry.yarnpkg.com/express/-/express-4.20.0.tgz#f1d08e591fcec770c07be4767af8eb9bcfd67c48" + integrity sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.20.2" + body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" cookie "0.6.0" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" finalhandler "1.2.0" fresh "0.5.2" http-errors "2.0.0" - merge-descriptors "1.0.1" + merge-descriptors "1.0.3" methods "~1.1.2" on-finished "2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.7" + path-to-regexp "0.1.10" proxy-addr "~2.0.7" qs "6.11.0" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" + send "0.19.0" + serve-static "1.16.0" setprototypeof "1.2.0" statuses "2.0.1" type-is "~1.6.18" @@ -3645,6 +3682,11 @@ function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.0.tgz#8bd763cc0af860a859cc5d49384d74b932cd2327" @@ -3682,6 +3724,17 @@ get-intrinsic@^1.0.2: has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -3768,6 +3821,13 @@ globby@8.0.1: pify "^3.0.0" slash "^1.0.0" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.11, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -3798,6 +3858,18 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" @@ -3872,6 +3944,13 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.x, he@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -4605,10 +4684,10 @@ memory-fs@^0.4.0, memory-fs@~0.4.1: errno "^0.1.3" readable-stream "^2.0.1" -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== merge-source-map@^1.1.0: version "1.1.0" @@ -4946,6 +5025,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" @@ -5192,10 +5276,10 @@ path-parse@^1.0.5: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== path-type@^3.0.0: version "3.0.0" @@ -5470,6 +5554,13 @@ qs@6.11.0, qs@^6.5.2: dependencies: side-channel "^1.0.4" +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -6024,6 +6115,25 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-javascript@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" @@ -6047,10 +6157,10 @@ serve-favicon@^2.5.0: parseurl "~1.3.2" safe-buffer "5.1.1" -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== +serve-static@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92" + integrity sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" @@ -6062,6 +6172,18 @@ set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -6145,6 +6267,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" diff --git a/packages/icons-vue/package.json b/packages/icons-vue/package.json index d9e651e442ca..82845ad06387 100644 --- a/packages/icons-vue/package.json +++ b/packages/icons-vue/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/icons-vue", "description": "Vue components for icons in digital and software products using the Carbon Design System", - "version": "10.98.0-rc.0", + "version": "10.98.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -30,12 +30,12 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "dependencies": { - "@carbon/icon-helpers": "^10.52.0-rc.0", + "@carbon/icon-helpers": "^10.52.0", "@ibm/telemetry-js": "^1.5.0" }, "devDependencies": { "@carbon/cli-reporter": "^10.7.0", - "@carbon/icons": "^11.49.0-rc.0", + "@carbon/icons": "^11.49.0", "fs-extra": "^11.0.0", "prettier": "^2.8.8", "rimraf": "^6.0.0", diff --git a/packages/icons/package.json b/packages/icons/package.json index 36874de8e7f0..922579106a96 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/icons", "description": "Icons for digital and software products using the Carbon Design System", - "version": "11.49.0-rc.0", + "version": "11.49.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -41,8 +41,8 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", - "@carbon/icon-build-helpers": "^1.30.0-rc.0", + "@carbon/cli": "^11.21.0", + "@carbon/icon-build-helpers": "^1.30.0", "rimraf": "^6.0.0" }, "dependencies": { diff --git a/packages/layout/package.json b/packages/layout/package.json index 683a1dc4cbcf..298ef5d7dc1e 100644 --- a/packages/layout/package.json +++ b/packages/layout/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/layout", "description": "Layout helpers for digital and software products using the Carbon Design System", - "version": "11.26.0-rc.0", + "version": "11.26.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -30,10 +30,10 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", + "@carbon/cli": "^11.21.0", "@carbon/cli-reporter": "^10.7.0", "@carbon/scss-generator": "^10.18.0", - "@carbon/test-utils": "^10.32.0-rc.0", + "@carbon/test-utils": "^10.32.0", "core-js": "^3.16.0", "rimraf": "^6.0.0" }, diff --git a/packages/motion/package.json b/packages/motion/package.json index e477ab3e7f75..5addc5da0ac5 100644 --- a/packages/motion/package.json +++ b/packages/motion/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/motion", "description": "Motion helpers for digital and software products using the Carbon Design System", - "version": "11.22.0-rc.0", + "version": "11.22.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -30,7 +30,7 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "devDependencies": { - "@carbon/cli": "^11.21.0-rc.0", + "@carbon/cli": "^11.21.0", "rimraf": "^6.0.0" }, "dependencies": { diff --git a/packages/pictograms-react/package.json b/packages/pictograms-react/package.json index 098511249bc9..4676af048cfd 100644 --- a/packages/pictograms-react/package.json +++ b/packages/pictograms-react/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/pictograms-react", "description": "React components for pictograms in digital and software products using the Carbon Design System", - "version": "11.66.0-rc.0", + "version": "11.66.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -39,13 +39,13 @@ "react": ">=16" }, "dependencies": { - "@carbon/icon-helpers": "^10.52.0-rc.0", + "@carbon/icon-helpers": "^10.52.0", "@ibm/telemetry-js": "^1.5.0", "prop-types": "^15.7.2" }, "devDependencies": { - "@carbon/icon-build-helpers": "^1.30.0-rc.0", - "@carbon/pictograms": "^12.40.0-rc.0", + "@carbon/icon-build-helpers": "^1.30.0", + "@carbon/pictograms": "^12.40.0", "rimraf": "^6.0.0" }, "sideEffects": false diff --git a/packages/pictograms/package.json b/packages/pictograms/package.json index 39cd1eb52f10..34177c16c318 100644 --- a/packages/pictograms/package.json +++ b/packages/pictograms/package.json @@ -1,7 +1,7 @@ { "name": "@carbon/pictograms", "description": "Pictograms for digital and software products using the Carbon Design System", - "version": "12.40.0-rc.0", + "version": "12.40.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -33,7 +33,7 @@ "postinstall": "ibmtelemetry --config=telemetry.yml" }, "devDependencies": { - "@carbon/icon-build-helpers": "^1.30.0-rc.0", + "@carbon/icon-build-helpers": "^1.30.0", "rimraf": "^6.0.0" }, "dependencies": { diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index f2be17fd003e..927fae777c62 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -12,33 +12,7 @@ Map { "type": "string", }, "aiTextLabel": [Function], - "align": Object { - "args": Array [ - Array [ - "top", - "top-left", - "top-start", - "top-right", - "top-end", - "bottom", - "bottom-left", - "bottom-start", - "bottom-right", - "bottom-end", - "left", - "left-bottom", - "left-end", - "left-top", - "left-start", - "right", - "right-bottom", - "right-end", - "right-top", - "right-start", - ], - ], - "type": "oneOf", - }, + "align": [Function], "aria-label": Object { "type": "string", }, @@ -446,21 +420,7 @@ Map { "isSelected": Object { "type": "bool", }, - "kind": Object { - "args": Array [ - Array [ - "primary", - "secondary", - "danger", - "ghost", - "danger--primary", - "danger--ghost", - "danger--tertiary", - "tertiary", - ], - ], - "type": "oneOf", - }, + "kind": [Function], "onBlur": Object { "type": "func", }, @@ -2955,6 +2915,9 @@ Map { "slug": Object { "type": "node", }, + "tagTitle": Object { + "type": "string", + }, "text": Object { "type": "string", }, @@ -10952,33 +10915,7 @@ Map { "type": "string", }, "aiTextLabel": [Function], - "align": Object { - "args": Array [ - Array [ - "top", - "top-left", - "top-start", - "top-right", - "top-end", - "bottom", - "bottom-left", - "bottom-start", - "bottom-right", - "bottom-end", - "left", - "left-bottom", - "left-end", - "left-top", - "left-start", - "right", - "right-bottom", - "right-end", - "right-top", - "right-start", - ], - ], - "type": "oneOf", - }, + "align": [Function], "aria-label": Object { "type": "string", }, diff --git a/packages/react/package.json b/packages/react/package.json index c7deaf5618aa..2651abd7e5d9 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.66.0-rc.0", + "version": "1.66.0", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.js", @@ -49,9 +49,9 @@ "dependencies": { "@babel/runtime": "^7.24.7", "@carbon/feature-flags": "^0.22.0", - "@carbon/icons-react": "^11.49.0-rc.0", - "@carbon/layout": "^11.26.0-rc.0", - "@carbon/styles": "^1.65.0-rc.0", + "@carbon/icons-react": "^11.49.0", + "@carbon/layout": "^11.26.0", + "@carbon/styles": "^1.65.0", "@floating-ui/react": "^0.26.0", "@ibm/telemetry-js": "^1.5.0", "classnames": "2.5.1", @@ -79,8 +79,8 @@ "@babel/preset-env": "^7.24.7", "@babel/preset-react": "^7.24.7", "@babel/preset-typescript": "^7.24.7", - "@carbon/test-utils": "^10.32.0-rc.0", - "@carbon/themes": "^11.40.0-rc.0", + "@carbon/test-utils": "^10.32.0", + "@carbon/themes": "^11.40.0", "@figma/code-connect": "^1.0.6", "@rollup/plugin-babel": "^6.0.0", "@rollup/plugin-commonjs": "^26.0.0", diff --git a/packages/react/src/components/AILabel/index.js b/packages/react/src/components/AILabel/index.js deleted file mode 100644 index 0ef644a03c3e..000000000000 --- a/packages/react/src/components/AILabel/index.js +++ /dev/null @@ -1,274 +0,0 @@ -/** - * Copyright IBM Corp. 2016, 2024 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -import cx from 'classnames'; -import PropTypes from 'prop-types'; -import React from 'react'; - -import { usePrefix } from '../../internal/usePrefix'; -import { - Toggletip, - ToggletipButton, - ToggletipContent, - ToggletipActions, -} from '../Toggletip'; -import { IconButton } from '../IconButton'; -import { Undo } from '@carbon/icons-react'; -import { useId } from '../../internal/useId'; -import deprecate from '../../prop-types/deprecate'; - -export const AILabelContent = React.forwardRef(function AILabelContent( - { children, className }, - ref -) { - const prefix = usePrefix(); - - const hasAILabelActions = React.Children.toArray(children).some( - (child) => child.type?.displayName === 'AILabelActions' - ); - - const aiLabelContentClasses = cx(className, { - [`${prefix}--slug-content`]: true, - [`${prefix}--slug-content--with-actions`]: hasAILabelActions, - }); - - return ( - - {children} - - ); -}); - -AILabelContent.displayName = 'AILabelContent'; -AILabelContent.propTypes = { - /** - * Specify the content you want rendered inside the slug ToggleTip - */ - children: PropTypes.node, - - /** - * Specify an optional className to be added to the AI slug callout - */ - className: PropTypes.string, -}; - -export const AILabelActions = React.forwardRef(function AILabelActions( - { children, className }, - ref -) { - const prefix = usePrefix(); - - const aiLabelActionsClasses = cx(className, { - [`${prefix}--slug-actions`]: true, - }); - - return ( - - {children} - - ); -}); - -AILabelActions.displayName = 'AILabelActions'; -AILabelActions.propTypes = { - /** - * Specify the content you want rendered inside the slug callout toolbar - */ - children: PropTypes.node, - - /** - * Specify an optional className to be added to the AI slug toolbar - */ - className: PropTypes.string, -}; - -export const AILabel = React.forwardRef(function AILabel( - { - aiText = 'AI', - aiTextLabel, - textLabel, - align, - autoAlign = true, - children, - className, - kind = 'default', - onRevertClick, - revertActive, - revertLabel = 'Revert to AI input', - slugLabel = 'Show information', - ['aria-label']: ariaLabel = 'Show information', - size = 'xs', - ...rest - }, - ref -) { - const prefix = usePrefix(); - const id = useId('AILabel'); - - const aiLabelClasses = cx(className, { - [`${prefix}--slug`]: true, - [`${prefix}--slug--revert`]: revertActive, - }); - - const aiLabelButtonClasses = cx({ - [`${prefix}--slug__button`]: true, - [`${prefix}--slug__button--${size}`]: size, - [`${prefix}--slug__button--${kind}`]: kind, - [`${prefix}--slug__button--inline-with-content`]: - kind === 'inline' && (aiTextLabel || textLabel), - }); - - const handleOnRevertClick = (evt) => { - if (onRevertClick) { - onRevertClick(evt); - } - }; - - const ariaLabelText = - !aiTextLabel && !textLabel - ? `${aiText} - ${slugLabel || ariaLabel}` - : `${aiText} - ${aiTextLabel || textLabel}`; - - return ( -
- {revertActive ? ( - - - - ) : ( - - - {aiText} - {kind === 'inline' && (aiTextLabel || textLabel) && ( - - {aiTextLabel || textLabel} - - )} - - {children} - - )} -
- ); -}); - -AILabel.displayName = 'AILabel'; -AILabel.propTypes = { - /** - * Specify the content you want rendered inside the `AILabel` ToggleTip - */ - AILabelContent: PropTypes.node, - - /** - * Specify the correct translation of the AI text - */ - aiText: PropTypes.string, - - /** - * @deprecated - * Specify additional text to be rendered next to the AI label in the inline variant - */ - aiTextLabel: deprecate( - PropTypes.string, - '`aiTextLabel` on `AILabel` has been deprecated - Please use the `textLabel` prop instead' - ), - - /** - * Specify how the popover should align with the button - */ - align: PropTypes.oneOf([ - 'top', - 'top-left', // deprecated use top-start instead - 'top-start', - 'top-right', // deprecated use top-end instead - 'top-end', - - 'bottom', - 'bottom-left', // deprecated use bottom-start instead - 'bottom-start', - 'bottom-right', // deprecated use bottom-end instead - 'bottom-end', - - 'left', - 'left-bottom', // deprecated use left-end instead - 'left-end', - 'left-top', // deprecated use left-start instead - 'left-start', - - 'right', - 'right-bottom', // deprecated use right-end instead - 'right-end', - 'right-top', // deprecated use right-start instead - 'right-start', - ]), - - /** - * Specify the text that will be provided to the aria-label of the `AILabel` button - */ - 'aria-label': PropTypes.string, - - /** - * Will auto-align the popover. This prop is currently experimental and is subject to future changes. - */ - autoAlign: PropTypes.bool, - - /** - * Specify the content you want rendered inside the `AILabel` ToggleTip - */ - children: PropTypes.node, - - /** - * Specify an optional className to be added to the `AILabel` - */ - className: PropTypes.string, - - /** - * Specify the type of `AILabel`, from the following list of types: - */ - kind: PropTypes.oneOf(['default', 'inline']), - - /** - * Callback function that fires when the revert button is clicked - */ - onRevertClick: PropTypes.func, - - /** - * Specify whether the revert button should be visible - */ - revertActive: PropTypes.bool, - - /** - * Specify the text that should be shown when the revert button is hovered - */ - revertLabel: PropTypes.string, - - /** - * Specify the size of the button, from the following list of sizes: - */ - size: PropTypes.oneOf(['mini', '2xs', 'xs', 'sm', 'md', 'lg', 'xl']), - - /** - * @deprecated - * Specify the text that will be provided to the aria-label of the `AILabel` button - */ - slugLabel: deprecate( - PropTypes.string, - '`slugLabel` on `AILabel` has been deprecated - Please use the `ariaLabel` prop instead' - ), - - /** - * Specify additional text to be rendered next to the AI label in the inline variant - */ - textLabel: PropTypes.string, -}; diff --git a/packages/react/src/components/AILabel/index.tsx b/packages/react/src/components/AILabel/index.tsx new file mode 100644 index 000000000000..82d16a8e854a --- /dev/null +++ b/packages/react/src/components/AILabel/index.tsx @@ -0,0 +1,356 @@ +/** + * Copyright IBM Corp. 2016, 2024 + * + * This source code is licensed under the Apache-2.0 license found in the + * LICENSE file in the root directory of this source tree. + */ + +import cx from 'classnames'; +import PropTypes from 'prop-types'; +import deprecateValuesWithin from '../../prop-types/deprecateValuesWithin'; +import React from 'react'; + +import { usePrefix } from '../../internal/usePrefix'; +import { + Toggletip, + ToggletipButton, + ToggletipContent, + ToggletipActions, +} from '../Toggletip'; +import { IconButton } from '../IconButton'; +import { mapPopoverAlignProp } from '../../tools/createPropAdapter'; +import { Undo } from '@carbon/icons-react'; +import { useId } from '../../internal/useId'; +import deprecate from '../../prop-types/deprecate'; + +export type AILabelContentProps = React.HTMLAttributes; + +export const AILabelContent = React.forwardRef(function AILabelContent( + { className, children, ...rest }: AILabelContentProps, + ref +) { + const prefix = usePrefix(); + + const hasAILabelActions = React.Children.toArray(children).some((child) => { + const item = child as any; + item.type?.displayName === 'AILabelActions'; + }); + + const aiLabelContentClasses = cx(className, { + [`${prefix}--slug-content`]: true, + [`${prefix}--slug-content--with-actions`]: hasAILabelActions, + }); + + return ( + + {children} + + ); +}); + +AILabelContent.displayName = 'AILabelContent'; +AILabelContent.propTypes = { + /** + * Specify the content you want rendered inside the slug ToggleTip + */ + children: PropTypes.node, + + /** + * Specify an optional className to be added to the AI slug callout + */ + className: PropTypes.string, +}; + +export type AILabelActionsProps = React.HTMLAttributes; + +export const AILabelActions = React.forwardRef(function AILabelActions( + { className, children, ...rest }: AILabelActionsProps, + ref +) { + const prefix = usePrefix(); + + const aiLabelActionsClasses = cx(className, { + [`${prefix}--slug-actions`]: true, + }); + + return ( + + {children} + + ); +}); + +AILabelActions.displayName = 'AILabelActions'; +AILabelActions.propTypes = { + /** + * Specify the content you want rendered inside the slug callout toolbar + */ + children: PropTypes.node, + + /** + * Specify an optional className to be added to the AI slug toolbar + */ + className: PropTypes.string, +}; + +/** + * Deprecated popover alignment values. + * @deprecated Use NewPopoverAlignment instead. + */ +export type DeprecatedAlignment = + | 'top-left' + | 'top-right' + | 'bottom-left' + | 'bottom-right' + | 'left-bottom' + | 'left-top' + | 'right-bottom' + | 'right-top'; + +export type NewAlignment = + | 'top' + | 'bottom' + | 'left' + | 'right' + | 'top-start' + | 'top-end' + | 'bottom-start' + | 'bottom-end' + | 'left-end' + | 'left-start' + | 'right-end' + | 'right-start'; + +export type Alignment = DeprecatedAlignment | NewAlignment; + +const propMappingFunction = (deprecatedValue) => { + return mapPopoverAlignProp(deprecatedValue); +}; + +interface AILabelProps { + AILabelContent?: React.ReactNode; + aiText?: string; + aiTextLabel?: string; + textLabel?: string; + align?: Alignment; + autoAlign?: boolean; + children?: React.ReactNode; + className?: string; + kind?: 'default' | 'inline'; + onRevertClick?: (evt: React.MouseEvent) => void; + revertActive?: boolean; + revertLabel?: string; + size?: 'mini' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'; + 'aria-label'?: string; + slugLabel?: string; +} + +export const AILabel = React.forwardRef( + function AILabel( + { + aiText = 'AI', + aiTextLabel, + textLabel, + align, + autoAlign = true, + children, + className, + kind = 'default', + onRevertClick, + revertActive, + revertLabel = 'Revert to AI input', + slugLabel = 'Show information', + ['aria-label']: ariaLabel = 'Show information', + size = 'xs', + ...rest + }, + ref + ) { + const prefix = usePrefix(); + const id = useId('AILabel'); + + const aiLabelClasses = cx(className, { + [`${prefix}--slug`]: true, + [`${prefix}--slug--revert`]: revertActive, + }); + + const aiLabelButtonClasses = cx({ + [`${prefix}--slug__button`]: true, + [`${prefix}--slug__button--${size}`]: size, + [`${prefix}--slug__button--${kind}`]: kind, + [`${prefix}--slug__button--inline-with-content`]: + kind === 'inline' && (aiTextLabel || textLabel), + }); + + const handleOnRevertClick = (evt) => { + if (onRevertClick) { + onRevertClick(evt); + } + }; + + const ariaLabelText = + !aiTextLabel && !textLabel + ? `${aiText} - ${slugLabel || ariaLabel}` + : `${aiText} - ${aiTextLabel || textLabel}`; + + return ( +
+ {revertActive ? ( + + + + ) : ( + + + {aiText} + {kind === 'inline' && (aiTextLabel || textLabel) && ( + + {aiTextLabel || textLabel} + + )} + + {children} + + )} +
+ ); + } +); + +AILabel.displayName = 'AILabel'; +AILabel.propTypes = { + /** + * Specify the content you want rendered inside the `AILabel` ToggleTip + */ + AILabelContent: PropTypes.node, + + /** + * Specify the correct translation of the AI text + */ + aiText: PropTypes.string, + + /** + * @deprecated + * Specify additional text to be rendered next to the AI label in the inline variant + */ + aiTextLabel: deprecate( + PropTypes.string, + '`aiTextLabel` on `AILabel` has been deprecated - Please use the `textLabel` prop instead' + ), + + /** + * Specify how the popover should align with the button + */ + align: deprecateValuesWithin( + PropTypes.oneOf([ + 'top', + 'top-left', // deprecated use top-start instead + 'top-right', // deprecated use top-end instead + + 'bottom', + 'bottom-left', // deprecated use bottom-start instead + 'bottom-right', // deprecated use bottom-end instead + + 'left', + 'left-bottom', // deprecated use left-end instead + 'left-top', // deprecated use left-start instead + + 'right', + 'right-bottom', // deprecated use right-end instead + 'right-top', // deprecated use right-start instead + + // new values to match floating-ui + 'top-start', + 'top-end', + 'bottom-start', + 'bottom-end', + 'left-end', + 'left-start', + 'right-end', + 'right-start', + ]), + //allowed prop values + [ + 'top', + 'top-start', + 'top-end', + 'bottom', + 'bottom-start', + 'bottom-end', + 'left', + 'left-start', + 'left-end', + 'right', + 'right-start', + 'right-end', + ], + //optional mapper function + propMappingFunction + ), + + /** + * Specify the text that will be provided to the aria-label of the `AILabel` button + */ + 'aria-label': PropTypes.string, + + /** + * Will auto-align the popover. This prop is currently experimental and is subject to future changes. + */ + autoAlign: PropTypes.bool, + + /** + * Specify the content you want rendered inside the `AILabel` ToggleTip + */ + children: PropTypes.node, + + /** + * Specify an optional className to be added to the `AILabel` + */ + className: PropTypes.string, + + /** + * Specify the type of `AILabel`, from the following list of types: + */ + kind: PropTypes.oneOf(['default', 'inline']), + + /** + * Callback function that fires when the revert button is clicked + */ + onRevertClick: PropTypes.func, + + /** + * Specify whether the revert button should be visible + */ + revertActive: PropTypes.bool, + + /** + * Specify the text that should be shown when the revert button is hovered + */ + revertLabel: PropTypes.string, + + /** + * Specify the size of the button, from the following list of sizes: + */ + size: PropTypes.oneOf(['mini', '2xs', 'xs', 'sm', 'md', 'lg', 'xl']), + + /** + * @deprecated + * Specify the text that will be provided to the aria-label of the `AILabel` button + */ + slugLabel: deprecate( + PropTypes.string, + '`slugLabel` on `AILabel` has been deprecated - Please use the `ariaLabel` prop instead' + ), + + /** + * Specify additional text to be rendered next to the AI label in the inline variant + */ + textLabel: PropTypes.string, +}; diff --git a/packages/react/src/components/Accordion/Accordion.tsx b/packages/react/src/components/Accordion/Accordion.tsx index ac6a76fb39d3..7f28b339b793 100644 --- a/packages/react/src/components/Accordion/Accordion.tsx +++ b/packages/react/src/components/Accordion/Accordion.tsx @@ -8,7 +8,7 @@ import cx from 'classnames'; import { usePrefix } from '../../internal/usePrefix'; import PropTypes from 'prop-types'; -import React, { PropsWithChildren } from 'react'; +import React, { PropsWithChildren, ReactNode } from 'react'; import { AccordionProvider } from './AccordionProvider'; export interface AccordionProps { @@ -24,6 +24,11 @@ export interface AccordionProps { */ className?: string; + /** + * Pass in the children that will be rendered within the Accordion + */ + children?: ReactNode; + /** * Specify whether an individual AccordionItem * should be disabled. diff --git a/packages/react/src/components/Button/Button.tsx b/packages/react/src/components/Button/Button.tsx index aaacd428199c..5ef1f557c7b9 100644 --- a/packages/react/src/components/Button/Button.tsx +++ b/packages/react/src/components/Button/Button.tsx @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import React, { useRef } from 'react'; -import { IconButton, IconButtonKind } from '../IconButton'; +import { IconButton, IconButtonKind, IconButtonKinds } from '../IconButton'; import { composeEventHandlers } from '../../tools/events'; import { PolymorphicProps } from '../../types/common'; import { PopoverAlignment } from '../Popover'; @@ -74,7 +74,9 @@ export interface ButtonBaseProps /** * Specify the kind of Button you want to create */ - kind?: ButtonKind; + kind?: ButtonBaseProps['hasIconOnly'] extends true + ? IconButtonKind + : ButtonKind; /** * Optional prop to allow overriding the icon rendering. @@ -266,8 +268,24 @@ Button.propTypes = { /** * Specify the kind of Button you want to create */ - // TODO: this should be either ButtonKinds or IconButtonKinds based on the value of "hasIconOnly" - kind: PropTypes.oneOf(ButtonKinds), + kind: (props, propName, componentName) => { + const { hasIconOnly } = props; + const validKinds = hasIconOnly ? IconButtonKinds : ButtonKinds; + + if (props[propName] === undefined) { + return null; + } + + if (!validKinds.includes(props[propName])) { + return new Error( + `Invalid prop \`${propName}\` supplied to \`${componentName}\`. Expected one of ${validKinds.join( + ', ' + )}.` + ); + } + + return null; + }, /** * Provide an optional function to be called when the button element diff --git a/packages/react/src/components/ComboBox/ComboBox.tsx b/packages/react/src/components/ComboBox/ComboBox.tsx index 225a60bf6159..3903ff5168c0 100644 --- a/packages/react/src/components/ComboBox/ComboBox.tsx +++ b/packages/react/src/components/ComboBox/ComboBox.tsx @@ -588,6 +588,7 @@ const ComboBox = forwardRef( [`${prefix}--list-box--up`]: direction === 'top', [`${prefix}--combo-box--warning`]: showWarning, [`${prefix}--combo-box--readonly`]: readOnly, + [`${prefix}--autoalign`]: autoAlign, }); const titleClasses = cx(`${prefix}--label`, { diff --git a/packages/react/src/components/Dropdown/Dropdown.tsx b/packages/react/src/components/Dropdown/Dropdown.tsx index 4a8336f588b6..7e85b61de651 100644 --- a/packages/react/src/components/Dropdown/Dropdown.tsx +++ b/packages/react/src/components/Dropdown/Dropdown.tsx @@ -390,7 +390,7 @@ const Dropdown = React.forwardRef( [`${prefix}--dropdown--readonly`]: readOnly, [`${prefix}--dropdown--${size}`]: size, [`${prefix}--list-box--up`]: direction === 'top', - [`${prefix}--dropdown--autoalign`]: autoAlign, + [`${prefix}--autoalign`]: autoAlign, }); const titleClasses = cx(`${prefix}--label`, { diff --git a/packages/react/src/components/FluidTextArea/FluidTextArea.Skeleton.js b/packages/react/src/components/FluidTextArea/FluidTextArea.Skeleton.js deleted file mode 100644 index fbe7186ae1fd..000000000000 --- a/packages/react/src/components/FluidTextArea/FluidTextArea.Skeleton.js +++ /dev/null @@ -1,32 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import classnames from 'classnames'; -import { usePrefix } from '../../internal/usePrefix'; -import { FormContext } from '../FluidForm/FormContext'; - -function FluidTextAreaSkeleton({ className, ...other }) { - const prefix = usePrefix(); - - return ( - -
- -
-
- - ); -} - -FluidTextAreaSkeleton.propTypes = { - /** - * Specify an optional className to be applied to the outer FluidForm wrapper - */ - className: PropTypes.string, -}; - -export default FluidTextAreaSkeleton; diff --git a/packages/react/src/components/FluidTextArea/FluidTextArea.Skeleton.tsx b/packages/react/src/components/FluidTextArea/FluidTextArea.Skeleton.tsx new file mode 100644 index 000000000000..e09eb4e1d929 --- /dev/null +++ b/packages/react/src/components/FluidTextArea/FluidTextArea.Skeleton.tsx @@ -0,0 +1,46 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import classnames from 'classnames'; +import { usePrefix } from '../../internal/usePrefix'; +import { FormContext } from '../FluidForm/FormContext'; + +export interface FluidTextAreaSkeletonProps { + /** + * Specify an optional className to be applied to the outer FluidForm wrapper + */ + className?: string; +} + +function FluidTextAreaSkeleton({ className, ...other }) { + const prefix = usePrefix(); + + const FluidTextAreaSkeleton: React.FC = ({ + className, + ...other + }) => { + const prefix = usePrefix(); + + return ( + +
+ +
+
+ + ); + }; +} + +FluidTextAreaSkeleton.propTypes = { + /** + * Specify an optional className to be applied to the outer FluidForm wrapper + */ + className: PropTypes.string, +}; + +export default FluidTextAreaSkeleton; diff --git a/packages/react/src/components/FluidTextArea/FluidTextArea.js b/packages/react/src/components/FluidTextArea/FluidTextArea.tsx similarity index 58% rename from packages/react/src/components/FluidTextArea/FluidTextArea.js rename to packages/react/src/components/FluidTextArea/FluidTextArea.tsx index 417fe6c4a977..78bce8a70e59 100644 --- a/packages/react/src/components/FluidTextArea/FluidTextArea.js +++ b/packages/react/src/components/FluidTextArea/FluidTextArea.tsx @@ -13,7 +13,117 @@ import deprecate from '../../prop-types/deprecate'; import { usePrefix } from '../../internal/usePrefix'; import { FormContext } from '../FluidForm/FormContext'; -function FluidTextArea({ className, ...other }) { +export interface FluidTextAreaProps { + /** + * Provide a custom className that is applied directly to the underlying + * `