diff --git a/.yarn/cache/postcss-loader-npm-7.0.0-e0a0c61fcd-b8e51e9989.zip b/.yarn/cache/postcss-loader-npm-7.0.0-e0a0c61fcd-b8e51e9989.zip
new file mode 100644
index 000000000000..944aeea2dac3
Binary files /dev/null and b/.yarn/cache/postcss-loader-npm-7.0.0-e0a0c61fcd-b8e51e9989.zip differ
diff --git a/docs/release.md b/docs/release.md
index d80fee0d1f3b..7d0b19d5a1b7 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -144,6 +144,9 @@ Friday of a sprint. To make the switch, you will need to:
### Post release
+- [ ] Update the
+ [release radar wiki page](https://github.com/carbon-design-system/carbon/wiki/Release-radar)
+
After a release has switched packages from `next` to `latest`, it is important
to monitor channels on Slack and issues on GitHub in case breaking changes may
have occurred in the release.
diff --git a/e2e/components/Notifications/Notifications-test.e2e.js b/e2e/components/Notifications/Notifications-test.e2e.js
index 5b12401a0328..595c41bec074 100644
--- a/e2e/components/Notifications/Notifications-test.e2e.js
+++ b/e2e/components/Notifications/Notifications-test.e2e.js
@@ -16,24 +16,24 @@ test.describe('Notifications', () => {
test.describe(theme, () => {
test('toast @vrt', async ({ page }) => {
await snapshotStory(page, {
- component: 'Notifications',
- id: 'components-notifications--toast',
+ component: 'Toast',
+ id: 'components-notifications-toast--default',
theme,
});
});
test('inline @vrt', async ({ page }) => {
await snapshotStory(page, {
- component: 'Notifications',
- id: 'components-notifications--inline',
+ component: 'Inline',
+ id: 'components-notifications-inline--default',
theme,
});
});
test('actionable @vrt', async ({ page }) => {
await snapshotStory(page, {
- component: 'Notifications',
- id: 'components-notifications--actionable',
+ component: 'Actionable',
+ id: 'components-notifications-actionable--default',
theme,
});
});
@@ -42,8 +42,8 @@ test.describe('Notifications', () => {
test('accessibility-checker @avt', async ({ page }) => {
await visitStory(page, {
- component: 'Notifications',
- id: 'components-notifications--toast',
+ component: 'Toast',
+ id: 'components-notifications-toast--default',
globals: {
theme: 'white',
},
diff --git a/e2e/icons-react/__snapshots__/PublicAPI-test.js.snap b/e2e/icons-react/__snapshots__/PublicAPI-test.js.snap
index ec9c64190c48..6c1ed52b3d40 100644
--- a/e2e/icons-react/__snapshots__/PublicAPI-test.js.snap
+++ b/e2e/icons-react/__snapshots__/PublicAPI-test.js.snap
@@ -784,6 +784,7 @@ Array [
"IbmCloud",
"IbmCloudDedicatedHost",
"IbmCloudInternetServices",
+ "IbmCloudKubernetesService",
"IbmCloudPakApplications",
"IbmCloudPakBusinessAutomation",
"IbmCloudPakData",
diff --git a/e2e/icons-vue/__snapshots__/PublicAPI-test.js.snap b/e2e/icons-vue/__snapshots__/PublicAPI-test.js.snap
index 10cf4d38896b..3851e4d9e2df 100644
--- a/e2e/icons-vue/__snapshots__/PublicAPI-test.js.snap
+++ b/e2e/icons-vue/__snapshots__/PublicAPI-test.js.snap
@@ -3121,6 +3121,10 @@ Array [
"IbmCloudInternetServices20",
"IbmCloudInternetServices24",
"IbmCloudInternetServices32",
+ "IbmCloudKubernetesService16",
+ "IbmCloudKubernetesService20",
+ "IbmCloudKubernetesService24",
+ "IbmCloudKubernetesService32",
"IbmCloudPakApplications16",
"IbmCloudPakApplications20",
"IbmCloudPakApplications24",
diff --git a/e2e/icons/__snapshots__/PublicAPI-test.js.snap b/e2e/icons/__snapshots__/PublicAPI-test.js.snap
index 67699e66f65c..26fc9a73eaa6 100644
--- a/e2e/icons/__snapshots__/PublicAPI-test.js.snap
+++ b/e2e/icons/__snapshots__/PublicAPI-test.js.snap
@@ -3120,6 +3120,10 @@ Array [
"IbmCloudInternetServices20",
"IbmCloudInternetServices24",
"IbmCloudInternetServices32",
+ "IbmCloudKubernetesService16",
+ "IbmCloudKubernetesService20",
+ "IbmCloudKubernetesService24",
+ "IbmCloudKubernetesService32",
"IbmCloudPakApplications16",
"IbmCloudPakApplications20",
"IbmCloudPakApplications24",
diff --git a/packages/grid/scss/_css-grid.scss b/packages/grid/scss/_css-grid.scss
index bfb584b61ecd..471b4903ba20 100644
--- a/packages/grid/scss/_css-grid.scss
+++ b/packages/grid/scss/_css-grid.scss
@@ -247,21 +247,21 @@
$span: $columns * 0.75;
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
.#{$prefix}--#{$name}\:col-span-50 {
$span: $columns * 0.5;
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
.#{$prefix}--#{$name}\:col-span-25 {
$span: $columns * 0.25;
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
} @else {
@include breakpoint($name) {
@@ -279,21 +279,21 @@
$span: $columns * 0.75;
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
.#{$prefix}--#{$name}\:col-span-50 {
$span: $columns * 0.5;
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
.#{$prefix}--#{$name}\:col-span-25 {
$span: $columns * 0.25;
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
}
}
@@ -426,7 +426,7 @@
@if is-smallest-breakpoint($key, $breakpoints) {
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
} @else {
$previous-breakpoint: breakpoint-prev($key, $breakpoints);
$previous-column-count: get-column-count(
@@ -439,7 +439,7 @@
@include breakpoint($key) {
--cds-grid-columns: #{$span};
- grid-column: span #{$span} / span #{$span};
+ grid-column: span list.slash($span, span) #{$span};
}
}
}
diff --git a/packages/grid/scss/_flex-grid.scss b/packages/grid/scss/_flex-grid.scss
index f9230c4a60bf..085c70f29d0f 100644
--- a/packages/grid/scss/_flex-grid.scss
+++ b/packages/grid/scss/_flex-grid.scss
@@ -70,13 +70,8 @@
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
- @if meta.function-exists('div', 'math') {
- max-width: math.percentage(math.div($span, $columns));
- flex: 0 0 math.percentage(math.div($span, $columns));
- } @else {
- max-width: math.percentage(($span / $columns));
- flex: 0 0 math.percentage(($span / $columns));
- }
+ max-width: math.percentage(math.div($span, $columns));
+ flex: 0 0 math.percentage(math.div($span, $columns));
}
}
@@ -87,11 +82,7 @@
/// @group @carbon/grid
@mixin -make-col-offset($span, $columns) {
$offset: 0;
- @if meta.function-exists('div', 'math') {
- $offset: math.div($span, $columns);
- } @else {
- $offset: ($span / $columns);
- }
+ $offset: math.div($span, $columns);
@if $offset == 0 {
margin-left: 0;
} @else {
diff --git a/packages/grid/scss/_mixins.scss b/packages/grid/scss/_mixins.scss
index d507e20df5c2..3ff2861dd3b4 100644
--- a/packages/grid/scss/_mixins.scss
+++ b/packages/grid/scss/_mixins.scss
@@ -64,13 +64,8 @@
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
- @if meta.function-exists('div', 'math') {
- max-width: math.percentage(math.div($span, $columns));
- flex: 0 0 math.percentage(math.div($span, $columns));
- } @else {
- max-width: math.percentage(($span / $columns));
- flex: 0 0 math.percentage(($span / $columns));
- }
+ max-width: math.percentage(math.div($span, $columns));
+ flex: 0 0 math.percentage(math.div($span, $columns));
}
}
@@ -81,11 +76,7 @@
/// @group @carbon/grid
@mixin -make-col-offset($span, $columns) {
$offset: 0;
- @if meta.function-exists('div', 'math') {
- $offset: math.div($span, $columns);
- } @else {
- $offset: ($span / $columns);
- }
+ $offset: math.div($span, $columns);
@if $offset == 0 {
margin-left: 0;
} @else {
diff --git a/packages/icons/categories.yml b/packages/icons/categories.yml
index 051f5807369f..8f86a04ccd1f 100644
--- a/packages/icons/categories.yml
+++ b/packages/icons/categories.yml
@@ -560,6 +560,7 @@ categories:
- ibm--open-enterprise-languages
- ibm-cloud--dedicated-host
- ibm-cloud--internet-services
+ - ibm-cloud--kubernetes-service
- ibm-cloud--security-compliance-center
- ibm-cloud--subnets
- ibm-cloud--transit-gateway
diff --git a/packages/icons/icons.yml b/packages/icons/icons.yml
index 7878bf0fa3db..3ace85742f96 100644
--- a/packages/icons/icons.yml
+++ b/packages/icons/icons.yml
@@ -5370,7 +5370,7 @@
- 32
- name: data-quality-definition
friendly_name: Data quality definition
- aliases:
+ aliases:
- data quality
- definition
- data
@@ -8823,7 +8823,7 @@
- 32
- name: ibm--open-enterprise-languages
friendly_name: IBM® Open Enterprise Languages
- aliases:
+ aliases:
- Open Enterprise Languages
- z16
sizes:
@@ -8866,6 +8866,16 @@
- cloud
sizes:
- 32
+- name: ibm-cloud--kubernetes-service
+ friendly_name: IBM Cloud® Kubernetes Services
+ aliases:
+ - services
+ - cloud
+ - hybrid
+ - IBM Cloud®
+ - Kubernetes
+ sizes:
+ - 32
- name: ibm-cloud--security-compliance-center
friendly_name: IBM Cloud® Security and Compliance Center
aliases:
@@ -8922,13 +8932,13 @@
- 32
- name: ibm-cloud-pak--business-automation
friendly_name: IBM Cloud Pak® for Business Automation
- aliases:
+ aliases:
- enterprise
- app
- automation
- IBM Cloud Pak®
- cloud
- - hybrid
+ - hybrid
sizes:
- 32
- name: ibm-cloud-pak--data
@@ -8952,8 +8962,8 @@
sizes:
- 32
- name: ibm-cloud-pak--MANTA-automated-data-lineage
- friendly_name: MANTA Automated Data Lineage for IBM Cloud Pak® for Data
- aliases:
+ friendly_name: MANTA Automated Data Lineage for IBM Cloud Pak® for Data
+ aliases:
- data
- IBM Cloud Pak® for Data
- data lineage
@@ -9046,8 +9056,8 @@
sizes:
- 32
- name: ibm-z--cloud-mod-stack
- friendly_name: IBM Z® Cloud Modernization Stack
- aliases:
+ friendly_name: IBM Z® Cloud Modernization Stack
+ aliases:
- cloud
- modernization
- IBM Z®
@@ -9056,8 +9066,8 @@
sizes:
- 32
- name: ibm-z-cloud--provisioning
- friendly_name: IBM Z® and Cloud Modernization Stack Provisioning
- aliases:
+ friendly_name: IBM Z® and Cloud Modernization Stack Provisioning
+ aliases:
- IBM Z®
- cloud
- provisioning
@@ -9066,8 +9076,8 @@
sizes:
- 32
- name: ibm-z-os--package-manager
- friendly_name: IBM® z/OS Package Manager
- aliases:
+ friendly_name: IBM® z/OS Package Manager
+ aliases:
- IBM Z®
- cloud
- mainframe
@@ -10831,7 +10841,7 @@
- 32
- name: logo--kubernetes
friendly_name: Logo Kubernetes
- aliases:
+ aliases:
- brand
- emblem
- logotype
@@ -11529,14 +11539,14 @@
- 32
- name: microservices--1
friendly_name: Microservices 1
- aliases:
+ aliases:
- microservices 1
- systems
sizes:
- 32
- name: microservices--2
friendly_name: Microservices 2
- aliases:
+ aliases:
- microservices 2
- systems
sizes:
@@ -14646,7 +14656,7 @@
- 32
- name: rule--data-quality
friendly_name: Rule data quality
- aliases:
+ aliases:
- rule
- governance
- control
@@ -15268,7 +15278,7 @@
- 32
- name: service-id
friendly_name: Service ID
- aliases:
+ aliases:
- service ID
- identification
- settings
@@ -19492,7 +19502,7 @@
- 32
- name: workflow-automation
friendly_name: Workflow automation
- aliases:
+ aliases:
- workflow
- automation
- gear
diff --git a/packages/icons/src/svg/32/ibm-cloud--kubernetes-service.svg b/packages/icons/src/svg/32/ibm-cloud--kubernetes-service.svg
new file mode 100644
index 000000000000..1bebbec1aaae
--- /dev/null
+++ b/packages/icons/src/svg/32/ibm-cloud--kubernetes-service.svg
@@ -0,0 +1,14 @@
+
+
+
diff --git a/packages/layout/scss/_convert.import.scss b/packages/layout/scss/_convert.import.scss
deleted file mode 100644
index 3ddfe00c476c..000000000000
--- a/packages/layout/scss/_convert.import.scss
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// Copyright IBM Corp. 2018, 2018
-//
-// This source code is licensed under the Apache-2.0 license found in the
-// LICENSE file in the root directory of this source tree.
-//
-//-------------------------------------------
-// Compatibility notes (*.import.scss)
-// ------------------------------------------
-//
-// This file is intended to be consumed and processed with dart-sass.
-// It is incompatible with node-sass/libsass as it contains sass language features
-// or functions that are unavailable in node-sass/libsass, such as `math.div`.
-//
-// The non-`.import` suffixed version of this file eg. `_filename.scss`
-// is intended to be compatible with node-sass/libsass.
-//
-// Styles authored within this file must be duplicated to the corresponding
-// compatibility file to ensure we continue to support node-sass and dart-sass
-// in v10.
-
-@use 'sass:meta';
-@use 'sass:math';
-
-/// Default font size
-/// @type Number
-/// @access public
-/// @group @carbon/layout
-$carbon--base-font-size: 16px !default;
-
-/// Convert a given px unit to a rem unit
-/// @param {Number} $px - Number with px unit
-/// @return {Number} Number with rem unit
-/// @access public
-/// @group @carbon/layout
-@function carbon--rem($px) {
- @if unit($px) != 'px' {
- @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
- }
-
- @if meta.function-exists('div', 'math') {
- @return math.div($px, $carbon--base-font-size) * 1rem;
- } @else {
- @return ($px / $carbon--base-font-size) * 1rem;
- }
-}
-
-/// Convert a given px unit to a em unit
-/// @param {Number} $px - Number with px unit
-/// @return {Number} Number with em unit
-/// @access public
-/// @group @carbon/layout
-@function carbon--em($px) {
- @if unit($px) != 'px' {
- @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
- }
-
- @if meta.function-exists('div', 'math') {
- @return math.div($px, $carbon--base-font-size) * 1em;
- } @else {
- @return ($px / $carbon--base-font-size) * 1em;
- }
-}
diff --git a/packages/layout/scss/_convert.scss b/packages/layout/scss/_convert.scss
index c9e5313ffe94..40a24408f582 100644
--- a/packages/layout/scss/_convert.scss
+++ b/packages/layout/scss/_convert.scss
@@ -24,11 +24,7 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}
- @if meta.function-exists('div', 'math') {
- @return math.div($px, $base-font-size) * 1rem;
- } @else {
- @return ($px / $base-font-size) * 1rem;
- }
+ @return math.div($px, $base-font-size) * 1rem;
}
/// Convert a given px unit to a em unit
@@ -41,9 +37,5 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}
- @if meta.function-exists('div', 'math') {
- @return math.div($px, $base-font-size) * 1em;
- } @else {
- @return ($px / $base-font-size) * 1em;
- }
+ @return math.div($px, $base-font-size) * 1em;
}
diff --git a/packages/layout/scss/modules/_convert.scss b/packages/layout/scss/modules/_convert.scss
index c9e5313ffe94..40a24408f582 100644
--- a/packages/layout/scss/modules/_convert.scss
+++ b/packages/layout/scss/modules/_convert.scss
@@ -24,11 +24,7 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}
- @if meta.function-exists('div', 'math') {
- @return math.div($px, $base-font-size) * 1rem;
- } @else {
- @return ($px / $base-font-size) * 1rem;
- }
+ @return math.div($px, $base-font-size) * 1rem;
}
/// Convert a given px unit to a em unit
@@ -41,9 +37,5 @@ $base-font-size: 16px !default;
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
}
- @if meta.function-exists('div', 'math') {
- @return math.div($px, $base-font-size) * 1em;
- } @else {
- @return ($px / $base-font-size) * 1em;
- }
+ @return math.div($px, $base-font-size) * 1em;
}
diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
index e67176bca615..dc154b6235a1 100644
--- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
+++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
@@ -91,8 +91,83 @@ Map {
},
},
"ActionableNotification" => Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
+ "defaultProps": Object {
+ "closeOnEscape": true,
+ "hasFocus": true,
+ "hideCloseButton": false,
+ "inline": false,
+ "kind": "error",
+ "onCloseButtonClick": [Function],
+ "role": "alertdialog",
+ },
+ "propTypes": Object {
+ "actionButtonLabel": Object {
+ "isRequired": true,
+ "type": "string",
+ },
+ "ariaLabel": Object {
+ "type": "string",
+ },
+ "caption": Object {
+ "type": "string",
+ },
+ "children": Object {
+ "type": "node",
+ },
+ "className": Object {
+ "type": "string",
+ },
+ "closeOnEscape": Object {
+ "type": "bool",
+ },
+ "hasFocus": Object {
+ "type": "bool",
+ },
+ "hideCloseButton": Object {
+ "type": "bool",
+ },
+ "inline": Object {
+ "type": "bool",
+ },
+ "kind": Object {
+ "args": Array [
+ Array [
+ "error",
+ "info",
+ "info-square",
+ "success",
+ "warning",
+ "warning-alt",
+ ],
+ ],
+ "isRequired": true,
+ "type": "oneOf",
+ },
+ "lowContrast": Object {
+ "type": "bool",
+ },
+ "onActionButtonClick": Object {
+ "type": "func",
+ },
+ "onClose": Object {
+ "type": "func",
+ },
+ "onCloseButtonClick": Object {
+ "type": "func",
+ },
+ "role": Object {
+ "type": "string",
+ },
+ "statusIconDescription": Object {
+ "type": "string",
+ },
+ "subtitle": Object {
+ "type": "string",
+ },
+ "title": Object {
+ "type": "string",
+ },
+ },
},
"AspectRatio" => Object {
"propTypes": Object {
@@ -1154,9 +1229,7 @@ Map {
"render": [Function],
},
"ComposedModal" => Object {
- "contextType": Object {
- "$$typeof": Symbol(react.context),
- },
+ "$$typeof": Symbol(react.forward_ref),
"defaultProps": Object {
"onKeyDown": [Function],
"selectorPrimaryFocus": "[data-modal-primary-focus]",
@@ -1196,12 +1269,7 @@ Map {
"type": "string",
},
"selectorsFloatingMenus": Object {
- "args": Array [
- Object {
- "type": "string",
- },
- ],
- "type": "arrayOf",
+ "type": "string",
},
"size": Object {
"args": Array [
@@ -1215,6 +1283,7 @@ Map {
"type": "oneOf",
},
},
+ "render": [Function],
},
"Content" => Object {
"defaultProps": Object {
@@ -3694,8 +3763,64 @@ Map {
},
},
"InlineNotification" => Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
+ "defaultProps": Object {
+ "hideCloseButton": false,
+ "kind": "error",
+ "onCloseButtonClick": [Function],
+ "role": "status",
+ },
+ "propTypes": Object {
+ "children": Object {
+ "type": "node",
+ },
+ "className": Object {
+ "type": "string",
+ },
+ "hideCloseButton": Object {
+ "type": "bool",
+ },
+ "kind": Object {
+ "args": Array [
+ Array [
+ "error",
+ "info",
+ "info-square",
+ "success",
+ "warning",
+ "warning-alt",
+ ],
+ ],
+ "type": "oneOf",
+ },
+ "lowContrast": Object {
+ "type": "bool",
+ },
+ "onClose": Object {
+ "type": "func",
+ },
+ "onCloseButtonClick": Object {
+ "type": "func",
+ },
+ "role": Object {
+ "args": Array [
+ Array [
+ "alert",
+ "log",
+ "status",
+ ],
+ ],
+ "type": "oneOf",
+ },
+ "statusIconDescription": Object {
+ "type": "string",
+ },
+ "subtitle": Object {
+ "type": "string",
+ },
+ "title": Object {
+ "type": "string",
+ },
+ },
},
"Layer" => Object {
"propTypes": Object {
@@ -3793,7 +3918,7 @@ Map {
"Loading" => Object {
"defaultProps": Object {
"active": true,
- "description": "Active loading indicator",
+ "description": "loading",
"small": false,
"withOverlay": true,
},
@@ -3807,9 +3932,7 @@ Map {
"description": Object {
"type": "string",
},
- "id": Object {
- "type": "string",
- },
+ "id": [Function],
"small": Object {
"type": "bool",
},
@@ -4159,9 +4282,7 @@ Map {
"MultiSelect" => Object {
"$$typeof": Symbol(react.forward_ref),
"Filterable": Object {
- "contextType": Object {
- "$$typeof": Symbol(react.context),
- },
+ "$$typeof": Symbol(react.forward_ref),
"defaultProps": Object {
"ariaLabel": "Choose an item",
"compareItems": [Function],
@@ -4364,7 +4485,6 @@ Map {
"type": "bool",
},
"placeholder": Object {
- "isRequired": true,
"type": "string",
},
"selectionFeedback": Object {
@@ -4404,6 +4524,7 @@ Map {
"type": "node",
},
},
+ "render": [Function],
},
"defaultProps": Object {
"clearSelectionDescription": "Total items selected: ",
@@ -4668,16 +4789,83 @@ Map {
"render": [Function],
},
"NotificationActionButton" => Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
+ "propTypes": Object {
+ "children": Object {
+ "type": "node",
+ },
+ "className": Object {
+ "type": "string",
+ },
+ "inline": Object {
+ "type": "bool",
+ },
+ "onClick": Object {
+ "type": "func",
+ },
+ },
},
"NotificationButton" => Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
- },
- "NotificationTextDetails" => Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
+ "defaultProps": Object {
+ "ariaLabel": "close notification",
+ "notificationType": "toast",
+ "renderIcon": Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "propTypes": Object {
+ "size": Object {
+ "args": Array [
+ Array [
+ Object {
+ "type": "number",
+ },
+ Object {
+ "type": "string",
+ },
+ ],
+ ],
+ "type": "oneOfType",
+ },
+ },
+ "render": [Function],
+ },
+ "type": "button",
+ },
+ "propTypes": Object {
+ "ariaLabel": Object {
+ "type": "string",
+ },
+ "className": Object {
+ "type": "string",
+ },
+ "name": Object {
+ "type": "string",
+ },
+ "notificationType": Object {
+ "args": Array [
+ Array [
+ "toast",
+ "inline",
+ "actionable",
+ ],
+ ],
+ "type": "oneOf",
+ },
+ "renderIcon": Object {
+ "args": Array [
+ Array [
+ Object {
+ "type": "func",
+ },
+ Object {
+ "type": "object",
+ },
+ ],
+ ],
+ "type": "oneOfType",
+ },
+ "type": Object {
+ "type": "string",
+ },
+ },
},
"NumberInput" => Object {
"$$typeof": Symbol(react.forward_ref),
@@ -5328,7 +5516,6 @@ Map {
},
],
],
- "isRequired": true,
"type": "oneOfType",
},
},
@@ -6009,10 +6196,6 @@ Map {
},
"SideNavLink" => Object {
"$$typeof": Symbol(react.forward_ref),
- "defaultProps": Object {
- "element": "a",
- "large": false,
- },
"propTypes": Object {
"children": Object {
"isRequired": true,
@@ -6316,7 +6499,6 @@ Map {
"onClick": [Function],
"onKeyDown": [Function],
"selected": false,
- "text": "Provide text",
},
"propTypes": Object {
"children": Object {
@@ -7834,8 +8016,74 @@ Map {
"render": [Function],
},
"ToastNotification" => Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
+ "defaultProps": Object {
+ "hideCloseButton": false,
+ "kind": "error",
+ "onCloseButtonClick": [Function],
+ "role": "status",
+ "timeout": 0,
+ },
+ "propTypes": Object {
+ "ariaLabel": Object {
+ "type": "string",
+ },
+ "caption": Object {
+ "type": "string",
+ },
+ "children": Object {
+ "type": "node",
+ },
+ "className": Object {
+ "type": "string",
+ },
+ "hideCloseButton": Object {
+ "type": "bool",
+ },
+ "kind": Object {
+ "args": Array [
+ Array [
+ "error",
+ "info",
+ "info-square",
+ "success",
+ "warning",
+ "warning-alt",
+ ],
+ ],
+ "type": "oneOf",
+ },
+ "lowContrast": Object {
+ "type": "bool",
+ },
+ "onClose": Object {
+ "type": "func",
+ },
+ "onCloseButtonClick": Object {
+ "type": "func",
+ },
+ "role": Object {
+ "args": Array [
+ Array [
+ "alert",
+ "log",
+ "status",
+ ],
+ ],
+ "type": "oneOf",
+ },
+ "statusIconDescription": Object {
+ "type": "string",
+ },
+ "subtitle": Object {
+ "type": "string",
+ },
+ "timeout": Object {
+ "type": "number",
+ },
+ "title": Object {
+ "type": "string",
+ },
+ },
},
"Toggle" => Object {
"propTypes": Object {
diff --git a/packages/react/package.json b/packages/react/package.json
index 45942119174a..bba6d02578d9 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -100,7 +100,7 @@
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.4.5",
"postcss": "^8.4.5",
- "postcss-loader": "^6.2.1",
+ "postcss-loader": "^7.0.0",
"process": "^0.11.10",
"prop-types": "^15.7.2",
"react": "^17.0.2",
diff --git a/packages/react/src/__tests__/index-test.js b/packages/react/src/__tests__/index-test.js
index 7bd977da856a..48fc1f658f1d 100644
--- a/packages/react/src/__tests__/index-test.js
+++ b/packages/react/src/__tests__/index-test.js
@@ -99,7 +99,6 @@ describe('Carbon Components React', () => {
"MultiSelect",
"NotificationActionButton",
"NotificationButton",
- "NotificationTextDetails",
"NumberInput",
"NumberInputSkeleton",
"OrderedList",
diff --git a/packages/react/src/components/ComposedModal/ComposedModal-test.js b/packages/react/src/components/ComposedModal/ComposedModal-test.js
index 3881d8cbbbcf..cf0343c1a053 100644
--- a/packages/react/src/components/ComposedModal/ComposedModal-test.js
+++ b/packages/react/src/components/ComposedModal/ComposedModal-test.js
@@ -8,7 +8,8 @@
import React from 'react';
import { shallow, mount } from 'enzyme';
import Button from '../Button';
-import ComposedModal, {
+import {
+ ComposedModal,
ModalHeader,
ModalBody,
ModalFooter,
diff --git a/packages/react/src/components/ComposedModal/index.js b/packages/react/src/components/ComposedModal/index.js
index ab0019e7c102..1b483e9f4773 100644
--- a/packages/react/src/components/ComposedModal/index.js
+++ b/packages/react/src/components/ComposedModal/index.js
@@ -29,4 +29,3 @@ export const ComposedModal = FeatureFlags.enabled('enable-v11-release')
: ComposedModalClassic;
export { ModalBody };
-export default from './ComposedModal';
diff --git a/packages/react/src/components/ContentSwitcher/ContentSwitcher.stories.js b/packages/react/src/components/ContentSwitcher/ContentSwitcher.stories.js
index e7f922c634e3..61e554d893c8 100644
--- a/packages/react/src/components/ContentSwitcher/ContentSwitcher.stories.js
+++ b/packages/react/src/components/ContentSwitcher/ContentSwitcher.stories.js
@@ -34,7 +34,7 @@ export default {
export const Default = () => (
{}}>
-
+ Second section
);
diff --git a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap
index a4470d90c119..550867deb6e3 100644
--- a/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap
+++ b/packages/react/src/components/DataTable/__tests__/__snapshots__/DataTable-test.js.snap
@@ -112,13 +112,13 @@ exports[`DataTable selection -- radio buttons should not have select-all checkbo
>
DataTable with selection
@@ -556,7 +556,7 @@ exports[`DataTable selection -- radio buttons should render 1`] = `
-
-
-
+
-
+ Select row
+
+
+
+
+
|
-
-
-
+
-
-
-
-
- Select row
-
-
-
-
-
-
+ Select row
+
+
+
+
+
-
-
-
+
-
-
-
-
- Select row
-
-
-
-
-
-
+ Select row
+
+
+
+
+
DataTable with toolbar
diff --git a/packages/react/src/components/Dropdown/Dropdown.mdx b/packages/react/src/components/Dropdown/Dropdown.mdx
index ad9c14532baf..bd422019ebd8 100644
--- a/packages/react/src/components/Dropdown/Dropdown.mdx
+++ b/packages/react/src/components/Dropdown/Dropdown.mdx
@@ -115,7 +115,9 @@ const items = ['Option 1', 'Option 2', 'Option 3']
The `Dropdown` takes in an `items` array and can then be formatted by
`itemToElement` and `itemToString`. `itemToElement` allows you to wrap each
-dropdown item in a custom element.
+dropdown item in a custom element. The
+[`itemToString` prop](#dropdown-itemtostring) can be used with this to provide
+the text of the item in the input on selection.
(item ? item.text : '')}
+ itemToElement={(item) =>
+ item ? (
+
+ {item.text} 🔥
+
+ ) : (
+ ''
+ )
+ }
+ label="Select an option..."
+ id="item-to-element"
+/>
+
```jsx
(item ? item.text : '')}
+ itemToElement={(item) =>
+ item ? (
+
+ {item.text} 🔥
+
+ ) : (
+ ''
+ )
+ }
+ label="Select an option..."
+ id="item-to-element"
/>
```
diff --git a/packages/react/src/components/InlineLoading/InlineLoading-story.js b/packages/react/src/components/InlineLoading/InlineLoading-story.js
index db876a6b4f16..5a41c7c776e0 100644
--- a/packages/react/src/components/InlineLoading/InlineLoading-story.js
+++ b/packages/react/src/components/InlineLoading/InlineLoading-story.js
@@ -18,10 +18,7 @@ const props = () => ({
['inactive', 'active', 'finished', 'error'],
'active'
),
- iconDescription: text(
- 'Icon description (iconDescription)',
- 'Active loading indicator'
- ),
+ iconDescription: text('Icon description (iconDescription)', 'loading'),
description: text(
'Loading progress description (description)',
'Loading data...'
diff --git a/packages/react/src/components/InlineLoading/InlineLoading-test.js b/packages/react/src/components/InlineLoading/InlineLoading-test.js
index 00c0954db3e9..5007d6cc77e6 100644
--- a/packages/react/src/components/InlineLoading/InlineLoading-test.js
+++ b/packages/react/src/components/InlineLoading/InlineLoading-test.js
@@ -19,17 +19,13 @@ describe('InlineLoading', () => {
it('should render a loader by default', () => {
render();
- expect(
- screen.getByLabelText('Active loading indicator')
- ).toBeInTheDocument();
+ expect(screen.getByTitle('loading')).toBeInTheDocument();
});
it('should render a loader if the status is inactive', () => {
render();
- expect(
- screen.getByLabelText('Active loading indicator')
- ).toBeInTheDocument();
+ expect(screen.getByTitle('not loading')).toBeInTheDocument();
});
it('should render the success state if status is finished', () => {
diff --git a/packages/react/src/components/InlineLoading/InlineLoading.js b/packages/react/src/components/InlineLoading/InlineLoading.js
index 0881e8df4685..0b0724fa3c05 100644
--- a/packages/react/src/components/InlineLoading/InlineLoading.js
+++ b/packages/react/src/components/InlineLoading/InlineLoading.js
@@ -24,10 +24,11 @@ export default function InlineLoading({
const prefix = usePrefix();
const loadingClasses = classNames(`${prefix}--inline-loading`, className);
const getLoading = () => {
+ let iconLabel = iconDescription ? iconDescription : status;
if (status === 'error') {
return (
- {iconDescription}
+ {iconLabel}
);
}
@@ -40,15 +41,18 @@ export default function InlineLoading({
return (
- {iconDescription}
+ {iconLabel}
);
}
if (status === 'inactive' || status === 'active') {
+ if (!iconDescription) {
+ iconLabel = status === 'active' ? 'loading' : 'not loading';
+ }
return (
diff --git a/packages/react/src/components/InlineLoading/next/InlineLoading.stories.js b/packages/react/src/components/InlineLoading/next/InlineLoading.stories.js
index 252d1c63f53f..7f4ca6da067d 100644
--- a/packages/react/src/components/InlineLoading/next/InlineLoading.stories.js
+++ b/packages/react/src/components/InlineLoading/next/InlineLoading.stories.js
@@ -17,7 +17,7 @@ export default {
export const _InlineLoading = () => (
);
diff --git a/packages/react/src/components/Loading/Loading-story.js b/packages/react/src/components/Loading/Loading-story.js
index e2a6bd4205c5..5aba97dd12f7 100644
--- a/packages/react/src/components/Loading/Loading-story.js
+++ b/packages/react/src/components/Loading/Loading-story.js
@@ -13,7 +13,7 @@ const props = () => ({
active: boolean('Active (active)', true),
withOverlay: boolean('With overlay (withOverlay)', false),
small: boolean('Small (small)', false),
- description: text('Description (description)', 'Active loading indicator'),
+ description: text('Description (description)', 'Loading'),
});
export default {
@@ -25,13 +25,3 @@ export default {
export const Default = () => {
return ;
};
-
-Default.parameters = {
- info: {
- text: `
- Loading spinners are used when retrieving data or performing slow computations,
- and help to notify users that loading is underway. The 'active' property is true by default;
- set to false to end the animation.
- `,
- },
-};
diff --git a/packages/react/src/components/Loading/Loading-test.js b/packages/react/src/components/Loading/Loading-test.js
index b3dfbc2b4bb2..dae90cc00637 100644
--- a/packages/react/src/components/Loading/Loading-test.js
+++ b/packages/react/src/components/Loading/Loading-test.js
@@ -36,13 +36,6 @@ describe('Loading', () => {
const { container } = render();
const liveRegion = container.querySelector('[aria-live]');
expect(liveRegion).toBeInstanceOf(HTMLElement);
-
- const id = liveRegion.getAttribute('aria-labelledby');
- expect(id).toBeDefined();
-
- const label = document.getElementById(id);
- expect(label).toBeDefined();
- expect(typeof label.textContent).toBe('string');
});
// https://www.w3.org/TR/WCAG21/#status-messages
diff --git a/packages/react/src/components/Loading/Loading.js b/packages/react/src/components/Loading/Loading.js
index 460fded0e183..d8a3f8475c5f 100644
--- a/packages/react/src/components/Loading/Loading.js
+++ b/packages/react/src/components/Loading/Loading.js
@@ -7,14 +7,11 @@
import cx from 'classnames';
import PropTypes from 'prop-types';
-import React, { useRef } from 'react';
-import setupGetInstanceId from '../../tools/setupGetInstanceId';
+import React from 'react';
import { usePrefix } from '../../internal/usePrefix';
-
-const getInstanceId = setupGetInstanceId();
+import deprecate from '../../prop-types/deprecate';
function Loading({
- id,
active,
className: customClassName,
withOverlay,
@@ -23,7 +20,6 @@ function Loading({
...rest
}) {
const prefix = usePrefix();
- const { current: instanceId } = useRef(getInstanceId());
const loadingClassName = cx(customClassName, {
[`${prefix}--loading`]: true,
[`${prefix}--loading--small`]: small,
@@ -33,18 +29,13 @@ function Loading({
[`${prefix}--loading-overlay`]: true,
[`${prefix}--loading-overlay--stop`]: !active,
});
- const loadingId = id || `loading-id-${instanceId}`;
const loading = (
-
- {description}
-