diff --git a/packages/components/docs/sass.md b/packages/components/docs/sass.md
index 813dab7e8120..b548dc72ae39 100644
--- a/packages/components/docs/sass.md
+++ b/packages/components/docs/sass.md
@@ -170,7 +170,8 @@
- [✅inverse-support-03 [variable]](#inverse-support-03-variable)
- [✅inverse-support-04 [variable]](#inverse-support-04-variable)
- [✅overlay-01 [variable]](#overlay-01-variable)
- - [✅danger [variable]](#danger-variable)
+ - [✅danger-01 [variable]](#danger-01-variable)
+ - [✅danger-02 [variable]](#danger-02-variable)
- [✅focus [variable]](#focus-variable)
- [✅inverse-focus-ui [variable]](#inverse-focus-ui-variable)
- [✅hover-primary [variable]](#hover-primary-variable)
@@ -4212,7 +4213,8 @@ Define theme variables from a map of tokens
$inverse-support-03: map-get($theme, 'inverse-support-03') !global;
$inverse-support-04: map-get($theme, 'inverse-support-04') !global;
$overlay-01: map-get($theme, 'overlay-01') !global;
- $danger: map-get($theme, 'danger') !global;
+ $danger-01: map-get($theme, 'danger-01') !global;
+ $danger-02: map-get($theme, 'danger-02') !global;
$focus: map-get($theme, 'focus') !global;
$inverse-focus-ui: map-get($theme, 'inverse-focus-ui') !global;
$hover-primary: map-get($theme, 'hover-primary') !global;
@@ -4447,9 +4449,13 @@ Define theme variables from a map of tokens
--#{$custom-property-prefix}-overlay-01,
map-get($theme, 'overlay-01')
) !global;
- $danger: var(
- --#{$custom-property-prefix}-danger,
- map-get($theme, 'danger')
+ $danger-01: var(
+ --#{$custom-property-prefix}-danger-01,
+ map-get($theme, 'danger-01')
+ ) !global;
+ $danger-02: var(
+ --#{$custom-property-prefix}-danger-02,
+ map-get($theme, 'danger-02')
) !global;
$focus: var(
--#{$custom-property-prefix}-focus,
@@ -4978,8 +4984,14 @@ Define theme variables from a map of tokens
@include custom-property('overlay-01', map-get($theme, 'overlay-01'));
}
- @if should-emit($theme, $parent-carbon-theme, 'danger', $emit-difference) {
- @include custom-property('danger', map-get($theme, 'danger'));
+ @if should-emit($theme, $parent-carbon-theme, 'danger-01', $emit-difference)
+ {
+ @include custom-property('danger-01', map-get($theme, 'danger-01'));
+ }
+
+ @if should-emit($theme, $parent-carbon-theme, 'danger-02', $emit-difference)
+ {
+ @include custom-property('danger-02', map-get($theme, 'danger-02'));
}
@if should-emit($theme, $parent-carbon-theme, 'focus', $emit-difference) {
@@ -6018,7 +6030,8 @@ Define theme variables from a map of tokens
- [inverse-support-03 [variable]](#inverse-support-03-variable)
- [inverse-support-04 [variable]](#inverse-support-04-variable)
- [overlay-01 [variable]](#overlay-01-variable)
- - [danger [variable]](#danger-variable)
+ - [danger-01 [variable]](#danger-01-variable)
+ - [danger-02 [variable]](#danger-02-variable)
- [focus [variable]](#focus-variable)
- [inverse-focus-ui [variable]](#inverse-focus-ui-variable)
- [hover-primary [variable]](#hover-primary-variable)
@@ -6181,6 +6194,7 @@ $carbon--theme--g90: map-merge(
inverse-support-02: #24a148,
inverse-support-04: #0f62fe,
overlay-01: rgba(22, 22, 22, 0.7),
+ danger-02: #ff8389,
focus: #ffffff,
inverse-focus-ui: #0f62fe,
hover-primary-text: #a6c8ff,
@@ -6258,6 +6272,7 @@ $carbon--theme--g100: map-merge(
inverse-support-02: #24a148,
inverse-support-04: #0f62fe,
overlay-01: rgba(22, 22, 22, 0.7),
+ danger-02: #fa4d56,
focus: #ffffff,
inverse-focus-ui: #0f62fe,
hover-primary-text: #a6c8ff,
@@ -6419,7 +6434,8 @@ $carbon--theme: (
inverse-support-03: if(global-variable-exists('inverse-support-03'), $inverse-support-03, map-get($carbon--theme--white, 'inverse-support-03')),
inverse-support-04: if(global-variable-exists('inverse-support-04'), $inverse-support-04, map-get($carbon--theme--white, 'inverse-support-04')),
overlay-01: if(global-variable-exists('overlay-01'), $overlay-01, map-get($carbon--theme--white, 'overlay-01')),
- danger: if(global-variable-exists('danger'), $danger, map-get($carbon--theme--white, 'danger')),
+ danger-01: if(global-variable-exists('danger-01'), $danger-01, map-get($carbon--theme--white, 'danger-01')),
+ danger-02: if(global-variable-exists('danger-02'), $danger-02, map-get($carbon--theme--white, 'danger-02')),
focus: if(global-variable-exists('focus'), $focus, map-get($carbon--theme--white, 'focus')),
inverse-focus-ui: if(global-variable-exists('inverse-focus-ui'), $inverse-focus-ui, map-get($carbon--theme--white, 'inverse-focus-ui')),
hover-primary: if(global-variable-exists('hover-primary'), $hover-primary, map-get($carbon--theme--white, 'hover-primary')),
@@ -7623,18 +7639,42 @@ $overlay-01: if(
- [modal [mixin]](#modal-mixin)
- [carbon-side-nav [mixin]](#carbon-side-nav-mixin)
-### ✅danger [variable]
+### ✅danger-01 [variable]
+
+
+Source code
+
+```scss
+$danger-01: if(
+ global-variable-exists('carbon--theme') and map-has-key(
+ $carbon--theme,
+ 'danger-01'
+ ),
+ map-get($carbon--theme, 'danger-01'),
+ #da1e28
+);
+```
+
+
+
+- **Group**: [@carbon/themes](#carbonthemes)
+- **Type**: `{undefined}`
+- **Used by**:
+ - [carbon--theme [mixin]](#carbon--theme-mixin)
+ - [button [mixin]](#button-mixin)
+
+### ✅danger-02 [variable]
Source code
```scss
-$danger: if(
+$danger-02: if(
global-variable-exists('carbon--theme') and map-has-key(
$carbon--theme,
- 'danger'
+ 'danger-02'
),
- map-get($carbon--theme, 'danger'),
+ map-get($carbon--theme, 'danger-02'),
#da1e28
);
```
@@ -14188,7 +14228,7 @@ Button styles
.#{$prefix}--btn--danger {
@include button-theme(
- $danger,
+ $danger-01,
transparent,
$text-04,
$hover-danger,
@@ -14199,6 +14239,75 @@ Button styles
&:hover {
color: $text-04;
}
+
+ &-tertiary {
+ @include button-theme(
+ transparent,
+ $danger-02,
+ $danger-02,
+ $hover-danger,
+ currentColor,
+ $active-danger
+ );
+
+ &:hover {
+ color: $text-04;
+ border-color: $hover-danger;
+ }
+
+ &:focus {
+ color: $text-04;
+ background-color: $danger-01;
+ }
+
+ &:active {
+ color: $text-04;
+ border-color: $active-danger;
+ }
+ }
+
+ &-ghost {
+ @include button-theme(
+ transparent,
+ transparent,
+ $danger-02,
+ $hover-danger,
+ currentColor,
+ $active-danger
+ );
+
+ padding: $button-padding-ghost;
+
+ .#{$prefix}--btn__icon {
+ position: static;
+ margin-left: $carbon--spacing-03;
+ }
+
+ &:hover,
+ &:active {
+ color: $text-04;
+ }
+
+ &:disabled,
+ &:hover:disabled,
+ &:focus:disabled,
+ &.#{$prefix}--btn--disabled,
+ &.#{$prefix}--btn--disabled:hover,
+ &.#{$prefix}--btn--disabled:focus {
+ color: $disabled;
+ background: transparent;
+ border-color: transparent;
+ outline: none;
+ }
+
+ &.#{$prefix}--btn--sm {
+ padding: $button-padding-ghost-sm;
+ }
+
+ &.#{$prefix}--btn--field {
+ padding: $button-padding-ghost-field;
+ }
+ }
}
.#{$prefix}--btn--sm {
@@ -14297,9 +14406,10 @@ Button styles
- [hover-primary-text [variable]](#hover-primary-text-variable)
- [icon-01 [variable]](#icon-01-variable)
- [focus [variable]](#focus-variable)
- - [danger [variable]](#danger-variable)
+ - [danger-01 [variable]](#danger-01-variable)
- [hover-danger [variable]](#hover-danger-variable)
- [active-danger [variable]](#active-danger-variable)
+ - [danger-02 [variable]](#danger-02-variable)
- [button-separator [variable]](#button-separator-variable)
### ❌button-base [mixin]
diff --git a/packages/components/src/components/button/_button.scss b/packages/components/src/components/button/_button.scss
index 185ca961a803..53c3392e0312 100644
--- a/packages/components/src/components/button/_button.scss
+++ b/packages/components/src/components/button/_button.scss
@@ -271,7 +271,7 @@
.#{$prefix}--btn--danger {
@include button-theme(
- $danger,
+ $danger-01,
transparent,
$text-04,
$hover-danger,
@@ -282,6 +282,75 @@
&:hover {
color: $text-04;
}
+
+ &-tertiary {
+ @include button-theme(
+ transparent,
+ $danger-02,
+ $danger-02,
+ $hover-danger,
+ currentColor,
+ $active-danger
+ );
+
+ &:hover {
+ color: $text-04;
+ border-color: $hover-danger;
+ }
+
+ &:focus {
+ color: $text-04;
+ background-color: $danger-01;
+ }
+
+ &:active {
+ color: $text-04;
+ border-color: $active-danger;
+ }
+ }
+
+ &-ghost {
+ @include button-theme(
+ transparent,
+ transparent,
+ $danger-02,
+ $hover-danger,
+ currentColor,
+ $active-danger
+ );
+
+ padding: $button-padding-ghost;
+
+ .#{$prefix}--btn__icon {
+ position: static;
+ margin-left: $carbon--spacing-03;
+ }
+
+ &:hover,
+ &:active {
+ color: $text-04;
+ }
+
+ &:disabled,
+ &:hover:disabled,
+ &:focus:disabled,
+ &.#{$prefix}--btn--disabled,
+ &.#{$prefix}--btn--disabled:hover,
+ &.#{$prefix}--btn--disabled:focus {
+ color: $disabled;
+ background: transparent;
+ border-color: transparent;
+ outline: none;
+ }
+
+ &.#{$prefix}--btn--sm {
+ padding: $button-padding-ghost-sm;
+ }
+
+ &.#{$prefix}--btn--field {
+ padding: $button-padding-ghost-field;
+ }
+ }
}
.#{$prefix}--btn--sm {
diff --git a/packages/elements/docs/sass.md b/packages/elements/docs/sass.md
index 092fc4b5e877..5f633b92fe1d 100644
--- a/packages/elements/docs/sass.md
+++ b/packages/elements/docs/sass.md
@@ -170,7 +170,8 @@
- [✅inverse-support-03 [variable]](#inverse-support-03-variable)
- [✅inverse-support-04 [variable]](#inverse-support-04-variable)
- [✅overlay-01 [variable]](#overlay-01-variable)
- - [✅danger [variable]](#danger-variable)
+ - [✅danger-01 [variable]](#danger-01-variable)
+ - [✅danger-02 [variable]](#danger-02-variable)
- [✅focus [variable]](#focus-variable)
- [✅inverse-focus-ui [variable]](#inverse-focus-ui-variable)
- [✅hover-primary [variable]](#hover-primary-variable)
@@ -3823,7 +3824,8 @@ Define theme variables from a map of tokens
$inverse-support-03: map-get($theme, 'inverse-support-03') !global;
$inverse-support-04: map-get($theme, 'inverse-support-04') !global;
$overlay-01: map-get($theme, 'overlay-01') !global;
- $danger: map-get($theme, 'danger') !global;
+ $danger-01: map-get($theme, 'danger-01') !global;
+ $danger-02: map-get($theme, 'danger-02') !global;
$focus: map-get($theme, 'focus') !global;
$inverse-focus-ui: map-get($theme, 'inverse-focus-ui') !global;
$hover-primary: map-get($theme, 'hover-primary') !global;
@@ -4058,9 +4060,13 @@ Define theme variables from a map of tokens
--#{$custom-property-prefix}-overlay-01,
map-get($theme, 'overlay-01')
) !global;
- $danger: var(
- --#{$custom-property-prefix}-danger,
- map-get($theme, 'danger')
+ $danger-01: var(
+ --#{$custom-property-prefix}-danger-01,
+ map-get($theme, 'danger-01')
+ ) !global;
+ $danger-02: var(
+ --#{$custom-property-prefix}-danger-02,
+ map-get($theme, 'danger-02')
) !global;
$focus: var(
--#{$custom-property-prefix}-focus,
@@ -4589,8 +4595,14 @@ Define theme variables from a map of tokens
@include custom-property('overlay-01', map-get($theme, 'overlay-01'));
}
- @if should-emit($theme, $parent-carbon-theme, 'danger', $emit-difference) {
- @include custom-property('danger', map-get($theme, 'danger'));
+ @if should-emit($theme, $parent-carbon-theme, 'danger-01', $emit-difference)
+ {
+ @include custom-property('danger-01', map-get($theme, 'danger-01'));
+ }
+
+ @if should-emit($theme, $parent-carbon-theme, 'danger-02', $emit-difference)
+ {
+ @include custom-property('danger-02', map-get($theme, 'danger-02'));
}
@if should-emit($theme, $parent-carbon-theme, 'focus', $emit-difference) {
@@ -5629,7 +5641,8 @@ Define theme variables from a map of tokens
- [inverse-support-03 [variable]](#inverse-support-03-variable)
- [inverse-support-04 [variable]](#inverse-support-04-variable)
- [overlay-01 [variable]](#overlay-01-variable)
- - [danger [variable]](#danger-variable)
+ - [danger-01 [variable]](#danger-01-variable)
+ - [danger-02 [variable]](#danger-02-variable)
- [focus [variable]](#focus-variable)
- [inverse-focus-ui [variable]](#inverse-focus-ui-variable)
- [hover-primary [variable]](#hover-primary-variable)
@@ -5792,6 +5805,7 @@ $carbon--theme--g90: map-merge(
inverse-support-02: #24a148,
inverse-support-04: #0f62fe,
overlay-01: rgba(22, 22, 22, 0.7),
+ danger-02: #ff8389,
focus: #ffffff,
inverse-focus-ui: #0f62fe,
hover-primary-text: #a6c8ff,
@@ -5869,6 +5883,7 @@ $carbon--theme--g100: map-merge(
inverse-support-02: #24a148,
inverse-support-04: #0f62fe,
overlay-01: rgba(22, 22, 22, 0.7),
+ danger-02: #fa4d56,
focus: #ffffff,
inverse-focus-ui: #0f62fe,
hover-primary-text: #a6c8ff,
@@ -6030,7 +6045,8 @@ $carbon--theme: (
inverse-support-03: if(global-variable-exists('inverse-support-03'), $inverse-support-03, map-get($carbon--theme--white, 'inverse-support-03')),
inverse-support-04: if(global-variable-exists('inverse-support-04'), $inverse-support-04, map-get($carbon--theme--white, 'inverse-support-04')),
overlay-01: if(global-variable-exists('overlay-01'), $overlay-01, map-get($carbon--theme--white, 'overlay-01')),
- danger: if(global-variable-exists('danger'), $danger, map-get($carbon--theme--white, 'danger')),
+ danger-01: if(global-variable-exists('danger-01'), $danger-01, map-get($carbon--theme--white, 'danger-01')),
+ danger-02: if(global-variable-exists('danger-02'), $danger-02, map-get($carbon--theme--white, 'danger-02')),
focus: if(global-variable-exists('focus'), $focus, map-get($carbon--theme--white, 'focus')),
inverse-focus-ui: if(global-variable-exists('inverse-focus-ui'), $inverse-focus-ui, map-get($carbon--theme--white, 'inverse-focus-ui')),
hover-primary: if(global-variable-exists('hover-primary'), $hover-primary, map-get($carbon--theme--white, 'hover-primary')),
@@ -6985,18 +7001,41 @@ $overlay-01: if(
- **Used by**:
- [carbon--theme [mixin]](#carbon--theme-mixin)
-### ✅danger [variable]
+### ✅danger-01 [variable]
+
+
+Source code
+
+```scss
+$danger-01: if(
+ global-variable-exists('carbon--theme') and map-has-key(
+ $carbon--theme,
+ 'danger-01'
+ ),
+ map-get($carbon--theme, 'danger-01'),
+ #da1e28
+);
+```
+
+
+
+- **Group**: [@carbon/themes](#carbonthemes)
+- **Type**: `{undefined}`
+- **Used by**:
+ - [carbon--theme [mixin]](#carbon--theme-mixin)
+
+### ✅danger-02 [variable]
Source code
```scss
-$danger: if(
+$danger-02: if(
global-variable-exists('carbon--theme') and map-has-key(
$carbon--theme,
- 'danger'
+ 'danger-02'
),
- map-get($carbon--theme, 'danger'),
+ map-get($carbon--theme, 'danger-02'),
#da1e28
);
```
diff --git a/packages/react/src/components/Button/Button-story.js b/packages/react/src/components/Button/Button-story.js
index a90cee04867a..31aa23770e90 100644
--- a/packages/react/src/components/Button/Button-story.js
+++ b/packages/react/src/components/Button/Button-story.js
@@ -153,7 +153,15 @@ export const Tertiary = () => {
};
export const Danger = () => {
- return ;
+ return (
+ <>
+
+
+
+
+
+ >
+ );
};
export const Ghost = () => {
diff --git a/packages/react/src/components/Button/Button-test.js b/packages/react/src/components/Button/Button-test.js
index f2f8b00e7798..7f8292c6b9b8 100644
--- a/packages/react/src/components/Button/Button-test.js
+++ b/packages/react/src/components/Button/Button-test.js
@@ -247,6 +247,22 @@ describe('DangerButton', () => {
expect(wrapper.hasClass('extra-class')).toEqual(true);
});
});
+
+ describe('Renders tertiary variation as expected', () => {
+ const wrapper = shallow();
+
+ it('has the expected classes', () => {
+ expect(wrapper.hasClass(`${prefix}--btn--danger-tertiary`)).toEqual(true);
+ });
+ });
+
+ describe('Renders ghost variation as expected', () => {
+ const wrapper = shallow();
+
+ it('has the expected classes', () => {
+ expect(wrapper.hasClass(`${prefix}--btn--danger-ghost`)).toEqual(true);
+ });
+ });
});
describe('danger--primaryButton', () => {
diff --git a/packages/react/src/components/Button/Button.mdx b/packages/react/src/components/Button/Button.mdx
index 6d28844a2128..458c58a1ad41 100644
--- a/packages/react/src/components/Button/Button.mdx
+++ b/packages/react/src/components/Button/Button.mdx
@@ -58,8 +58,8 @@ user interacts with it.
## Icon-only Buttons
Icon buttons allow users to take actions, and make choices, with a single tap.
-Icon buttons can take the form of any of the five types (Primary, Secondary,
-Tertiary, Danger and Ghost) but most commonly will be styled as primary or ghost
+Icon buttons can take the form of any of the seven types (Primary, Secondary,
+Tertiary, Danger, Danger tertiary, Danger ghost and Ghost) but most commonly will be styled as primary or ghost
buttons.
@@ -161,14 +161,15 @@ button is interacted with.
### Button `kind`
-Carbon has five types of buttons, `primary`, `secondary`, `tertiary`, `ghost`,
-and `danger`. If no `kind` is specified, a `primary` button will be rendered.
+Carbon has seven types of buttons, `primary`, `secondary`, `tertiary`, `ghost`,
+`danger`, `danger-tertiary`, and `danger-ghost`. If no `kind` is specified, a `primary` button will be rendered.
For more information on when to use each variant, check out the
[design documentation](https://www.carbondesignsystem.com/components/button/usage#overview)
+
@@ -177,6 +178,8 @@ For more information on when to use each variant, check out the
+
+
```
diff --git a/packages/themes/docs/sass.md b/packages/themes/docs/sass.md
index 31b0aa8e3573..1f79314a075b 100644
--- a/packages/themes/docs/sass.md
+++ b/packages/themes/docs/sass.md
@@ -52,7 +52,8 @@
- [✅inverse-support-03 [variable]](#inverse-support-03-variable)
- [✅inverse-support-04 [variable]](#inverse-support-04-variable)
- [✅overlay-01 [variable]](#overlay-01-variable)
- - [✅danger [variable]](#danger-variable)
+ - [✅danger-01 [variable]](#danger-01-variable)
+ - [✅danger-02 [variable]](#danger-02-variable)
- [✅focus [variable]](#focus-variable)
- [✅inverse-focus-ui [variable]](#inverse-focus-ui-variable)
- [✅hover-primary [variable]](#hover-primary-variable)
@@ -259,7 +260,8 @@ Define theme variables from a map of tokens
$inverse-support-03: map-get($theme, 'inverse-support-03') !global;
$inverse-support-04: map-get($theme, 'inverse-support-04') !global;
$overlay-01: map-get($theme, 'overlay-01') !global;
- $danger: map-get($theme, 'danger') !global;
+ $danger-01: map-get($theme, 'danger-01') !global;
+ $danger-02: map-get($theme, 'danger-02') !global;
$focus: map-get($theme, 'focus') !global;
$inverse-focus-ui: map-get($theme, 'inverse-focus-ui') !global;
$hover-primary: map-get($theme, 'hover-primary') !global;
@@ -494,9 +496,13 @@ Define theme variables from a map of tokens
--#{$custom-property-prefix}-overlay-01,
map-get($theme, 'overlay-01')
) !global;
- $danger: var(
- --#{$custom-property-prefix}-danger,
- map-get($theme, 'danger')
+ $danger-01: var(
+ --#{$custom-property-prefix}-danger-01,
+ map-get($theme, 'danger-01')
+ ) !global;
+ $danger-02: var(
+ --#{$custom-property-prefix}-danger-02,
+ map-get($theme, 'danger-02')
) !global;
$focus: var(
--#{$custom-property-prefix}-focus,
@@ -1025,8 +1031,14 @@ Define theme variables from a map of tokens
@include custom-property('overlay-01', map-get($theme, 'overlay-01'));
}
- @if should-emit($theme, $parent-carbon-theme, 'danger', $emit-difference) {
- @include custom-property('danger', map-get($theme, 'danger'));
+ @if should-emit($theme, $parent-carbon-theme, 'danger-01', $emit-difference)
+ {
+ @include custom-property('danger-01', map-get($theme, 'danger-01'));
+ }
+
+ @if should-emit($theme, $parent-carbon-theme, 'danger-02', $emit-difference)
+ {
+ @include custom-property('danger-02', map-get($theme, 'danger-02'));
}
@if should-emit($theme, $parent-carbon-theme, 'focus', $emit-difference) {
@@ -2065,7 +2077,8 @@ Define theme variables from a map of tokens
- [inverse-support-03 [variable]](#inverse-support-03-variable)
- [inverse-support-04 [variable]](#inverse-support-04-variable)
- [overlay-01 [variable]](#overlay-01-variable)
- - [danger [variable]](#danger-variable)
+ - [danger-01 [variable]](#danger-01-variable)
+ - [danger-02 [variable]](#danger-02-variable)
- [focus [variable]](#focus-variable)
- [inverse-focus-ui [variable]](#inverse-focus-ui-variable)
- [hover-primary [variable]](#hover-primary-variable)
@@ -2228,6 +2241,7 @@ $carbon--theme--g90: map-merge(
inverse-support-02: #24a148,
inverse-support-04: #0f62fe,
overlay-01: rgba(22, 22, 22, 0.7),
+ danger-02: #ff8389,
focus: #ffffff,
inverse-focus-ui: #0f62fe,
hover-primary-text: #a6c8ff,
@@ -2305,6 +2319,7 @@ $carbon--theme--g100: map-merge(
inverse-support-02: #24a148,
inverse-support-04: #0f62fe,
overlay-01: rgba(22, 22, 22, 0.7),
+ danger-02: #fa4d56,
focus: #ffffff,
inverse-focus-ui: #0f62fe,
hover-primary-text: #a6c8ff,
@@ -2466,7 +2481,8 @@ $carbon--theme: (
inverse-support-03: if(global-variable-exists('inverse-support-03'), $inverse-support-03, map-get($carbon--theme--white, 'inverse-support-03')),
inverse-support-04: if(global-variable-exists('inverse-support-04'), $inverse-support-04, map-get($carbon--theme--white, 'inverse-support-04')),
overlay-01: if(global-variable-exists('overlay-01'), $overlay-01, map-get($carbon--theme--white, 'overlay-01')),
- danger: if(global-variable-exists('danger'), $danger, map-get($carbon--theme--white, 'danger')),
+ danger-01: if(global-variable-exists('danger-01'), $danger-01, map-get($carbon--theme--white, 'danger-01')),
+ danger-02: if(global-variable-exists('danger-02'), $danger-02, map-get($carbon--theme--white, 'danger-02')),
focus: if(global-variable-exists('focus'), $focus, map-get($carbon--theme--white, 'focus')),
inverse-focus-ui: if(global-variable-exists('inverse-focus-ui'), $inverse-focus-ui, map-get($carbon--theme--white, 'inverse-focus-ui')),
hover-primary: if(global-variable-exists('hover-primary'), $hover-primary, map-get($carbon--theme--white, 'hover-primary')),
@@ -3421,18 +3437,41 @@ $overlay-01: if(
- **Used by**:
- [carbon--theme [mixin]](#carbon--theme-mixin)
-### ✅danger [variable]
+### ✅danger-01 [variable]
+
+
+Source code
+
+```scss
+$danger-01: if(
+ global-variable-exists('carbon--theme') and map-has-key(
+ $carbon--theme,
+ 'danger-01'
+ ),
+ map-get($carbon--theme, 'danger-01'),
+ #da1e28
+);
+```
+
+
+
+- **Group**: [@carbon/themes](#carbonthemes)
+- **Type**: `{undefined}`
+- **Used by**:
+ - [carbon--theme [mixin]](#carbon--theme-mixin)
+
+### ✅danger-02 [variable]
Source code
```scss
-$danger: if(
+$danger-02: if(
global-variable-exists('carbon--theme') and map-has-key(
$carbon--theme,
- 'danger'
+ 'danger-02'
),
- map-get($carbon--theme, 'danger'),
+ map-get($carbon--theme, 'danger-02'),
#da1e28
);
```
diff --git a/packages/themes/src/g10.js b/packages/themes/src/g10.js
index 813ef805dba1..1f6075980e42 100644
--- a/packages/themes/src/g10.js
+++ b/packages/themes/src/g10.js
@@ -88,7 +88,8 @@ export const inverseSupport04 = blue50;
export const overlay01 = rgba(gray100, 0.5);
-export const danger = red60;
+export const danger01 = red60;
+export const danger02 = red60;
// Interaction states
export const focus = blue60;
@@ -113,7 +114,7 @@ export const inverseHoverUI = '#4c4c4c';
export const hoverSelectedUI = '#cacaca';
-export const hoverDanger = adjustLightness(danger, -8);
+export const hoverDanger = adjustLightness(danger01, -8);
export const activeDanger = red80;
export const hoverRow = '#e5e5e5';
diff --git a/packages/themes/src/g100.js b/packages/themes/src/g100.js
index 0dbcd2509378..edc8d61cb565 100644
--- a/packages/themes/src/g100.js
+++ b/packages/themes/src/g100.js
@@ -87,7 +87,8 @@ export const inverseSupport04 = blue60;
export const overlay01 = rgba(gray100, 0.7);
-export const danger = red60;
+export const danger01 = red60;
+export const danger02 = red50;
// Interaction states
export const focus = white;
@@ -112,7 +113,7 @@ export const inverseHoverUI = '#e5e5e5';
export const hoverSelectedUI = '#4c4c4c';
-export const hoverDanger = adjustLightness(danger, -8);
+export const hoverDanger = adjustLightness(danger01, -8);
export const activeDanger = red80;
export const hoverRow = '#353535';
diff --git a/packages/themes/src/g90.js b/packages/themes/src/g90.js
index 918691d02a51..e29d881b36e1 100644
--- a/packages/themes/src/g90.js
+++ b/packages/themes/src/g90.js
@@ -89,7 +89,8 @@ export const inverseSupport04 = blue60;
export const overlay01 = rgba(gray100, 0.7);
-export const danger = red60;
+export const danger01 = red60;
+export const danger02 = red40;
// Interaction states
export const focus = white;
@@ -114,7 +115,7 @@ export const inverseHoverUI = '#e5e5e5';
export const hoverSelectedUI = '#656565';
-export const hoverDanger = adjustLightness(danger, -8);
+export const hoverDanger = adjustLightness(danger01, -8);
export const activeDanger = red80;
export const hoverRow = '#4c4c4c';
diff --git a/packages/themes/src/tokens.js b/packages/themes/src/tokens.js
index 35d60acbbb20..40a91ec7f8f7 100644
--- a/packages/themes/src/tokens.js
+++ b/packages/themes/src/tokens.js
@@ -58,7 +58,8 @@ const colors = [
'overlay01',
- 'danger',
+ 'danger01',
+ 'danger02',
// Interactive states
'focus',
@@ -171,7 +172,8 @@ export const unstable__meta = {
'brand01',
'brand02',
'brand03',
- 'danger',
+ 'danger01',
+ 'danger02',
'ui01',
'ui02',
'ui03',
diff --git a/packages/themes/src/v9.js b/packages/themes/src/v9.js
index 407e2469e488..8ca378037bb6 100644
--- a/packages/themes/src/v9.js
+++ b/packages/themes/src/v9.js
@@ -52,7 +52,8 @@ export const inverseSupport04 = '#5aaafa';
export const overlay01 = 'rgba(223, 227, 230, 0.5)';
-export const danger = red60;
+export const danger01 = red60;
+export const danger02 = red60;
// Interaction states
export const focus = '#3d70b2';
diff --git a/packages/themes/src/white.js b/packages/themes/src/white.js
index b933910cdced..a0a27b07ce40 100644
--- a/packages/themes/src/white.js
+++ b/packages/themes/src/white.js
@@ -88,7 +88,8 @@ export const inverseSupport04 = blue50;
export const overlay01 = rgba(gray100, 0.5);
-export const danger = red60;
+export const danger01 = red60;
+export const danger02 = red60;
// Interaction states
export const focus = blue60;
@@ -113,7 +114,7 @@ export const inverseHoverUI = '#4c4c4c';
export const hoverSelectedUI = '#cacaca';
-export const hoverDanger = adjustLightness(danger, -8);
+export const hoverDanger = adjustLightness(danger01, -8);
export const activeDanger = red80;
export const hoverRow = '#e5e5e5';