diff --git a/config/babel-preset-carbon/package.json b/config/babel-preset-carbon/package.json
index 46ba489367a2..86f75bdc683f 100644
--- a/config/babel-preset-carbon/package.json
+++ b/config/babel-preset-carbon/package.json
@@ -1,7 +1,7 @@
{
"name": "babel-preset-carbon",
"private": true,
- "version": "0.4.0-rc.0",
+ "version": "0.4.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
@@ -26,6 +26,6 @@
"@babel/preset-env": "^7.18.2",
"@babel/preset-react": "^7.17.12",
"babel-plugin-dev-expression": "^0.2.3",
- "browserslist-config-carbon": "^11.1.0-rc.0"
+ "browserslist-config-carbon": "^11.1.0"
}
}
diff --git a/config/browserslist-config-carbon/package.json b/config/browserslist-config-carbon/package.json
index 0251b9de1883..85495ab82bc0 100644
--- a/config/browserslist-config-carbon/package.json
+++ b/config/browserslist-config-carbon/package.json
@@ -1,7 +1,7 @@
{
"name": "browserslist-config-carbon",
"description": "Browserslist config for the Carbon Design System",
- "version": "11.1.0-rc.0",
+ "version": "11.1.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
diff --git a/config/eslint-config-carbon/package.json b/config/eslint-config-carbon/package.json
index 521a01008eac..767949c55bde 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.1.0-rc.0",
+ "version": "3.1.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 ae2bb492ba13..ff82d4b82fab 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.7.0-rc.0",
+ "version": "1.7.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
diff --git a/config/prettier-config-carbon/package.json b/config/prettier-config-carbon/package.json
index 630e007b3d9e..f2b168c0803c 100644
--- a/config/prettier-config-carbon/package.json
+++ b/config/prettier-config-carbon/package.json
@@ -1,7 +1,7 @@
{
"name": "prettier-config-carbon",
"description": "Prettier config for the Carbon Design System",
- "version": "0.9.0-rc.0",
+ "version": "0.9.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 c1098abe38ec..3ff664d1aadd 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.12.0-rc.0",
+ "version": "1.12.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
diff --git a/docs/style.md b/docs/style.md
index 4c9e37910107..bd294fbbd490 100644
--- a/docs/style.md
+++ b/docs/style.md
@@ -255,6 +255,41 @@ change. When creating a new component, even if you do not anticipate an explicit
need to provide a forwarded ref, it's likely still worthwhile to include one to
avoid unecessary breaking changes in the future.
+#### Authoring dynamic/inline styles
+
+It's increasingly common for applications to use a Content Security Policy (CSP)
+header with a
+[`style-src` directive](https://content-security-policy.com/style-src/). When
+this is configured, inline styles are blocked. Due to this, `style={{}}` can not
+be used on any element within the codebase. The `react/forbid-component-props`
+eslint rule is configured to flag invalid usages of the `style` attribute/prop.
+
+Components that need dynamic or inline styles can author these via the
+[CSS Object Model (CSSOM)](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model).
+Dynamic styles can be set via individual properties on the
+[`CSSStyleDeclaration`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration)
+interface object provided to
+[`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement).
+This will usually need to be wrapped in a `useIsomorphicEffect` hook to ensure
+compatibility between SSR and browser environments and also to ensure the value
+is unset if not provided.
+
+```jsx
+function MyComponent({ width }) {
+ const ref = useRef();
+
+ useIsomorphicEffect(() => {
+ if (width) {
+ ref.current.style.width = `${width}px`;
+ } else {
+ ref.current.style.width = null;
+ }
+ }, [width]);
+
+ return ;
+}
+```
+
#### Translating a component
Certain components will need to expose a way for the caller to pass in
diff --git a/e2e/components/Popover/Popover-test.e2e.js b/e2e/components/Popover/Popover-test.e2e.js
new file mode 100644
index 000000000000..fcedb5ed4a8a
--- /dev/null
+++ b/e2e/components/Popover/Popover-test.e2e.js
@@ -0,0 +1,45 @@
+/**
+ * Copyright IBM Corp. 2022
+ *
+ * This source code is licensed under the Apache-2.0 license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+'use strict';
+
+const { expect, test } = require('@playwright/test');
+const { themes } = require('../../test-utils/env');
+const { snapshotStory, visitStory } = require('../../test-utils/storybook');
+
+test.describe('Popover', () => {
+ themes.forEach((theme) => {
+ test.describe(theme, () => {
+ test('Popover - auto align @vrt', async ({ page }) => {
+ await snapshotStory(page, {
+ component: 'Popover',
+ id: 'components-popover--auto-align',
+ theme,
+ });
+ });
+
+ test('Popover - isTabTip @vrt', async ({ page }) => {
+ await snapshotStory(page, {
+ component: 'Popover',
+ id: 'components-popover--tab-tip',
+ theme,
+ });
+ });
+ });
+ });
+
+ test('accessibility-checker @avt', async ({ page }) => {
+ await visitStory(page, {
+ component: 'Popover',
+ id: 'components-popover--auto-align',
+ globals: {
+ theme: 'white',
+ },
+ });
+ await expect(page).toHaveNoACViolations('Popover');
+ });
+});
diff --git a/examples/class-prefix/.gitignore b/examples/class-prefix/.gitignore
new file mode 100644
index 000000000000..a547bf36d8d1
--- /dev/null
+++ b/examples/class-prefix/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/examples/class-prefix/README.md b/examples/class-prefix/README.md
new file mode 100644
index 000000000000..0c804d4aad30
--- /dev/null
+++ b/examples/class-prefix/README.md
@@ -0,0 +1,52 @@
+This is a [Next.js](https://nextjs.org/) project bootstrapped with
+[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
+
+## Class Prefix
+
+By default, the prefix used by components is cds. However, you can change this
+prefix in Sass and coordinate that change to React using the ClassPrefix
+component.
+
+## Getting Started
+
+First, run `yarn` or `npm install` and then run the development server:
+
+```bash
+npm run dev
+# or
+yarn dev
+```
+
+Open [http://localhost:3000](http://localhost:3000) with your browser to see the
+result.
+
+## Sass
+
+First and foremost, if you want to use v11 styles in any capacity, you'll have
+to migrate to use `dart-sass`. `node-sass` has been deprecated and we migrated
+to `dart-sass` in v11. For more information about migrating, visit our docs
+[here](https://github.com/carbon-design-system/carbon/blob/main/docs/migration/v11.md#changing-from-node-sass-to-sass).
+
+In Sass, you can customize this prefix by writing the following:
+
+`@use '@carbon/react' with ( $prefix: 'custom' );`
+
+Similarly, you can configure scss/config directly:
+
+`@use '@carbon/react/scss/config' with ( $prefix: 'custom' );`
+
+## V11
+
+This example is of how to use ClassPrefix from v11 🎉.
+
+## Learn More
+
+To learn more about Next.js, take a look at the following resources:
+
+- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
+ features and API.
+- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+
+You can check out
+[the Next.js GitHub repository](https://github.com/vercel/next.js/) - your
+feedback and contributions are welcome!
diff --git a/examples/class-prefix/index.html b/examples/class-prefix/index.html
new file mode 100644
index 000000000000..b46ab83364e3
--- /dev/null
+++ b/examples/class-prefix/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Vite App
+
+
+
+
+
+
diff --git a/examples/class-prefix/package.json b/examples/class-prefix/package.json
new file mode 100644
index 000000000000..228febf9bc3a
--- /dev/null
+++ b/examples/class-prefix/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "class-prefix",
+ "private": true,
+ "version": "0.21.0",
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "@carbon/react": "^1.24.0",
+ "react": "^17.0.0",
+ "react-dom": "^17.0.0"
+ },
+ "devDependencies": {
+ "@types/react": "^18.0.0",
+ "@types/react-dom": "^18.0.0",
+ "@vitejs/plugin-react": "1.1.3",
+ "sass": "^1.51.0",
+ "vite": "^2.9.5"
+ }
+}
diff --git a/examples/class-prefix/src/App.jsx b/examples/class-prefix/src/App.jsx
new file mode 100644
index 000000000000..80dd0a6b0cde
--- /dev/null
+++ b/examples/class-prefix/src/App.jsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import { usePrefix } from '@carbon/react';
+import { ClassPrefix } from '@carbon/react';
+
+function ExampleComponent() {
+ const prefix = usePrefix();
+
+ return (
+
The current prefix is: {prefix}
+ )
+}
+
+function App() {
+ return (
+ <>
+
+
+
+
+ >
+ );
+}
+
+export default App
diff --git a/examples/class-prefix/src/index.scss b/examples/class-prefix/src/index.scss
new file mode 100644
index 000000000000..f34a79c34733
--- /dev/null
+++ b/examples/class-prefix/src/index.scss
@@ -0,0 +1,3 @@
+@use '@carbon/react' with (
+ $prefix: 'custom'
+);
diff --git a/examples/class-prefix/src/main.jsx b/examples/class-prefix/src/main.jsx
new file mode 100644
index 000000000000..475f242ecfef
--- /dev/null
+++ b/examples/class-prefix/src/main.jsx
@@ -0,0 +1,12 @@
+import './index.scss'
+
+import React from 'react'
+import ReactDOM from 'react-dom'
+import App from './App'
+
+ReactDOM.render(
+
+
+ ,
+ document.getElementById('root')
+);
diff --git a/examples/class-prefix/vite.config.js b/examples/class-prefix/vite.config.js
new file mode 100644
index 000000000000..a50be4eeb474
--- /dev/null
+++ b/examples/class-prefix/vite.config.js
@@ -0,0 +1,11 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [
+ react({
+ jsxRuntime: 'classic',
+ }),
+ ],
+});
diff --git a/examples/codesandbox-styles/package.json b/examples/codesandbox-styles/package.json
index d1e645bfd1f5..b24239921216 100644
--- a/examples/codesandbox-styles/package.json
+++ b/examples/codesandbox-styles/package.json
@@ -1,7 +1,7 @@
{
"name": "codesandbox-styles",
"private": true,
- "version": "0.27.0-rc.0",
+ "version": "0.27.0",
"scripts": {
"develop": "vite"
},
@@ -9,7 +9,7 @@
"vite": "^2.8.0"
},
"dependencies": {
- "@carbon/styles": "^1.24.0-rc.0",
+ "@carbon/styles": "^1.24.0",
"sass": "^1.51.0"
}
}
diff --git a/examples/codesandbox-with-sass-compilation/package.json b/examples/codesandbox-with-sass-compilation/package.json
index 0fe2bf16dc89..4027d59cdd8e 100644
--- a/examples/codesandbox-with-sass-compilation/package.json
+++ b/examples/codesandbox-with-sass-compilation/package.json
@@ -1,9 +1,9 @@
{
"name": "codesandbox-with-sass-compilation",
- "version": "0.25.0-rc.0",
+ "version": "0.25.0",
"private": true,
"dependencies": {
- "@carbon/react": "^1.24.0-rc.0",
+ "@carbon/react": "^1.24.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
diff --git a/examples/codesandbox/package.json b/examples/codesandbox/package.json
index f811e7649fd2..a7806e572400 100644
--- a/examples/codesandbox/package.json
+++ b/examples/codesandbox/package.json
@@ -1,9 +1,9 @@
{
"name": "codesandbox",
- "version": "0.25.0-rc.0",
+ "version": "0.25.0",
"private": true,
"dependencies": {
- "@carbon/react": "^1.24.0-rc.0",
+ "@carbon/react": "^1.24.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
diff --git a/examples/custom-theme/package.json b/examples/custom-theme/package.json
index 3cee7361517b..fd5a71b6703a 100644
--- a/examples/custom-theme/package.json
+++ b/examples/custom-theme/package.json
@@ -1,14 +1,14 @@
{
"name": "custom-theme",
"private": true,
- "version": "0.22.0-rc.0",
+ "version": "0.22.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
- "@carbon/react": "^1.24.0-rc.0",
+ "@carbon/react": "^1.24.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
diff --git a/examples/id-prefix/.gitignore b/examples/id-prefix/.gitignore
new file mode 100644
index 000000000000..a547bf36d8d1
--- /dev/null
+++ b/examples/id-prefix/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/examples/id-prefix/README.md b/examples/id-prefix/README.md
new file mode 100644
index 000000000000..4852068bcb5b
--- /dev/null
+++ b/examples/id-prefix/README.md
@@ -0,0 +1,49 @@
+This is a [Next.js](https://nextjs.org/) project bootstrapped with
+[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
+
+## Id Prefix
+
+This component is intended to be used in limited cases, primarily only if you
+have id conflicts when using v10 and v11 packages at the same time during
+migration.
+
+In React, you can use IdPrefix anywhere in your component tree and specify the
+prefix with the prefix prop. Most often it's used in the project root wrapping
+the entire project
+
+## Getting Started
+
+First, run `yarn` or `npm install` and then run the development server:
+
+```bash
+npm run dev
+# or
+yarn dev
+```
+
+Open [http://localhost:3000](http://localhost:3000) with your browser to see the
+result.
+
+## Sass
+
+First and foremost, if you want to use v11 styles in any capacity, you'll have
+to migrate to use `dart-sass`. `node-sass` has been deprecated and we migrated
+to `dart-sass` in v11. For more information about migrating, visit our docs
+[here](https://github.com/carbon-design-system/carbon/blob/main/docs/migration/v11.md#changing-from-node-sass-to-sass).
+
+## V10 and V11
+
+This example is a v11 feature using the IdPrefix 🎉. As mentioned above, it will
+help with any id conflicts as you migrate over to v11.
+
+## Learn More
+
+To learn more about Next.js, take a look at the following resources:
+
+- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
+ features and API.
+- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+
+You can check out
+[the Next.js GitHub repository](https://github.com/vercel/next.js/) - your
+feedback and contributions are welcome!
diff --git a/examples/id-prefix/index.html b/examples/id-prefix/index.html
new file mode 100644
index 000000000000..b46ab83364e3
--- /dev/null
+++ b/examples/id-prefix/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Vite App
+
+
+
+
+
+
diff --git a/examples/id-prefix/package.json b/examples/id-prefix/package.json
new file mode 100644
index 000000000000..761112b93c5d
--- /dev/null
+++ b/examples/id-prefix/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "id-prefix",
+ "private": true,
+ "version": "0.21.0",
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "@carbon/react": "^1.24.0",
+ "react": "^17.0.0",
+ "react-dom": "^17.0.0"
+ },
+ "devDependencies": {
+ "@types/react": "^18.0.0",
+ "@types/react-dom": "^18.0.0",
+ "@vitejs/plugin-react": "1.1.3",
+ "sass": "^1.51.0",
+ "vite": "^2.9.5"
+ }
+}
diff --git a/examples/id-prefix/src/App.jsx b/examples/id-prefix/src/App.jsx
new file mode 100644
index 000000000000..e837b2ed72ef
--- /dev/null
+++ b/examples/id-prefix/src/App.jsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import { useIdPrefix } from '@carbon/react';
+import { IdPrefix } from '@carbon/react';
+
+function ExampleComponent() {
+ const idPrefix = useIdPrefix();
+
+ return (
+