From 83fd4b20038d9f1a09b766f932fa63b496869bc5 Mon Sep 17 00:00:00 2001 From: Dusan Milko Date: Thu, 17 Dec 2020 08:23:38 -0600 Subject: [PATCH 1/4] =?UTF-8?q?fix(overflow):=20fix=20styling=20color=20fo?= =?UTF-8?q?r=20danger=20overflow=20to=20use=20danger=20to=E2=80=A6=20(#746?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(overflow): fix styling color for danger overflow to use danger token. Harness the power of currentColor * update per feedback Co-authored-by: Dusan Milko --- .../src/components/overflow-menu/_overflow-menu.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/components/overflow-menu/_overflow-menu.scss b/packages/components/src/components/overflow-menu/_overflow-menu.scss index 83c995c9e206..3471e4bb5fec 100644 --- a/packages/components/src/components/overflow-menu/_overflow-menu.scss +++ b/packages/components/src/components/overflow-menu/_overflow-menu.scss @@ -306,10 +306,10 @@ .#{$prefix}--overflow-menu-options__option--danger .#{$prefix}--overflow-menu-options__btn:focus { color: $text-04; - background-color: $support-01; + background-color: $danger-01; svg { - fill: $text-04; + fill: currentColor; } } From 437b855bd66760bde521fde18f0c68604fa75b02 Mon Sep 17 00:00:00 2001 From: carbon-bot Date: Thu, 17 Dec 2020 14:48:29 +0000 Subject: [PATCH 2/4] chore(project): sync generated files --- packages/components/docs/sass.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/components/docs/sass.md b/packages/components/docs/sass.md index 4c8bfa0c3ba9..cb9d1b173908 100644 --- a/packages/components/docs/sass.md +++ b/packages/components/docs/sass.md @@ -9729,7 +9729,6 @@ $support-01: if( - [inline-notifications [mixin]](#inline-notifications-mixin) - [toast-notifications [mixin]](#toast-notifications-mixin) - [number-input [mixin]](#number-input-mixin) - - [overflow-menu [mixin]](#overflow-menu-mixin) - [progress-indicator [mixin]](#progress-indicator-mixin) - [select [mixin]](#select-mixin) - [text-area [mixin]](#text-area-mixin) @@ -9982,6 +9981,7 @@ $danger-01: if( - **Used by**: - [carbon--theme [mixin]](#carbon--theme-mixin) - [button [mixin]](#button-mixin) + - [overflow-menu [mixin]](#overflow-menu-mixin) ### ✅danger-02 [variable] @@ -24306,10 +24306,10 @@ Overflow menu styles .#{$prefix}--overflow-menu-options__option--danger .#{$prefix}--overflow-menu-options__btn:focus { color: $text-04; - background-color: $support-01; + background-color: $danger-01; svg { - fill: $text-04; + fill: currentColor; } } @@ -24364,7 +24364,7 @@ Overflow menu styles - [text-01 [variable]](#text-01-variable) - [icon-02 [variable]](#icon-02-variable) - [text-04 [variable]](#text-04-variable) - - [support-01 [variable]](#support-01-variable) + - [danger-01 [variable]](#danger-01-variable) - [ui-01 [variable]](#ui-01-variable) - [disabled-02 [variable]](#disabled-02-variable) From 6db9cdbb5c02854c3dcd686ddd6861c0802c591e Mon Sep 17 00:00:00 2001 From: Evgeniy Podgaetskiy Date: Thu, 17 Dec 2020 17:57:21 +0200 Subject: [PATCH 3/4] fix(text-input): update prop-type for invalidText, warnText (#7430) * fix(text-input): update type invalidText, warnText * fix(text-input): update snapshot Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../react/__tests__/__snapshots__/PublicAPI-test.js.snap | 8 ++++---- .../src/components/TextInput/ControlledPasswordInput.js | 2 +- packages/react/src/components/TextInput/PasswordInput.js | 2 +- packages/react/src/components/TextInput/TextInput.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 79d58d0b05f4..33016a52039a 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -5319,7 +5319,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "isRequired": true, @@ -5427,7 +5427,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "isRequired": true, @@ -5538,7 +5538,7 @@ Map { "type": "bool", }, "invalidText": Object { - "type": "string", + "type": "node", }, "labelText": Object { "isRequired": true, @@ -5585,7 +5585,7 @@ Map { "type": "bool", }, "warnText": Object { - "type": "string", + "type": "node", }, }, "render": [Function], diff --git a/packages/react/src/components/TextInput/ControlledPasswordInput.js b/packages/react/src/components/TextInput/ControlledPasswordInput.js index 8dec73973bdb..c22402fe5da6 100644 --- a/packages/react/src/components/TextInput/ControlledPasswordInput.js +++ b/packages/react/src/components/TextInput/ControlledPasswordInput.js @@ -175,7 +175,7 @@ ControlledPasswordInput.propTypes = { /** * Provide the text that is displayed when the control is in an invalid state */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Provide the text that will be read by a screen reader when visiting this diff --git a/packages/react/src/components/TextInput/PasswordInput.js b/packages/react/src/components/TextInput/PasswordInput.js index 48d5107bfdc2..264b742f6e6b 100644 --- a/packages/react/src/components/TextInput/PasswordInput.js +++ b/packages/react/src/components/TextInput/PasswordInput.js @@ -177,7 +177,7 @@ PasswordInput.propTypes = { /** * Provide the text that is displayed when the control is in an invalid state */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Provide the text that will be read by a screen reader when visiting this diff --git a/packages/react/src/components/TextInput/TextInput.js b/packages/react/src/components/TextInput/TextInput.js index d4b969afa6de..8cf60adadf72 100644 --- a/packages/react/src/components/TextInput/TextInput.js +++ b/packages/react/src/components/TextInput/TextInput.js @@ -210,7 +210,7 @@ TextInput.propTypes = { /** * Provide the text that is displayed when the control is in an invalid state */ - invalidText: PropTypes.string, + invalidText: PropTypes.node, /** * Provide the text that will be read by a screen reader when visiting this @@ -262,7 +262,7 @@ TextInput.propTypes = { /** * Provide the text that is displayed when the control is in warning state */ - warnText: PropTypes.string, + warnText: PropTypes.node, }; TextInput.defaultProps = { From 00ad3fe9953ee01a5150a2ac79c95bc6a2d91cad Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Thu, 17 Dec 2020 11:22:00 -0500 Subject: [PATCH 4/4] docs(tooltip): add additional note for missing tooltip props (#7472) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/react/src/components/Tooltip/Tooltip.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react/src/components/Tooltip/Tooltip.mdx b/packages/react/src/components/Tooltip/Tooltip.mdx index bea5fcca31f5..c644d0a6fcbf 100644 --- a/packages/react/src/components/Tooltip/Tooltip.mdx +++ b/packages/react/src/components/Tooltip/Tooltip.mdx @@ -14,6 +14,11 @@ import { Props } from '@storybook/addon-docs/blocks'; ## Component API +Please note that in addition to the props below, `Tooltip` also has two +additional props: `triggerText` and `iconDescription`. If the `triggerText` prop +is _not_ provided, the `iconDescription` prop is required to populate the +`aria-label` property for a11y reasons. + ## Feedback