Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
[terra-dropdown-split-button] Added dashed border on split button whe…
Browse files Browse the repository at this point in the history
…n its get focussed (#3943)
  • Loading branch information
KV106606Viswanath authored Oct 26, 2023
1 parent 1be05ff commit 102a70f
Show file tree
Hide file tree
Showing 68 changed files with 27 additions and 15 deletions.
3 changes: 3 additions & 0 deletions packages/terra-core-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

## 1.45.0 - (October 16, 2023)

* Added
* Added aria-label attribute for `terra-dropdown-split-button` examples.

* Added
* Added a visual error note for invalid example in `terra-form-single-select`.
* Added example for `terra-badge` with `terra-html-table`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const Example = () => {
primaryOptionLabel="Primary Option"
onSelect={() => setMessage('Primary option clicked')}
isBlock
buttonAttrs={{
'aria-label': 'block split',
}}
>
<Item label="1st Option" onSelect={() => setMessage('1st option clicked')} />
<Item label="2nd Option" onSelect={() => setMessage('2nd option clicked')} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const GhostSplitButton = () => {
primaryOptionLabel="Reply"
onSelect={() => setMessage('Reply clicked')}
variant="ghost"
buttonAttrs={{
'aria-label': 'ghost split',
}}
>
<Item label="Reply All" onSelect={() => setMessage('Reply All clicked')} />
<Item label="Forward" onSelect={() => setMessage('Forward clicked')} />
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-dropdown-button/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Updated focus border as dashed border in `dropdown-split-button`.

## 1.36.0 - (August 8, 2023)

* Added
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-dropdown-button/src/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

&:focus {
border-right-color: map-get($color-map, focus-border-color);
box-shadow: map-get($color-map, focus-split-box-shadow);
outline: map-get($color-map, focus-split-outline);
}

&.is-active,
Expand All @@ -82,7 +82,7 @@
box-shadow: map-get($color-map, split-caret-box-shadow);

&:focus {
box-shadow: map-get($color-map, focus-split-caret-box-shadow);
outline: map-get($color-map, focus-split-caret-outline);
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none), (hover: hover) and (pointer: fine) {
&:hover {
Expand Down
8 changes: 4 additions & 4 deletions packages/terra-dropdown-button/src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ $terra-dropdown-button-neutral-color-scheme: (
focus-background-color: var(--terra-dropdown-button-focus-background-color-neutral, #dedfe0),
focus-border-color: var(--terra-dropdown-button-focus-border-color-neutral, #c8cacb),
focus-dropdown-box-shadow: var(--terra-dropdown-button-dropdown-type-focus-box-shadow-neutral, 0 0 0 1px rgba(76, 178, 233, 0.6), 0 0 0 3px rgba(76, 178, 233, 0.27)),
focus-split-box-shadow: var(--terra-dropdown-button-split-type-focus-box-shadow-neutral, 0 0 0 1px rgba(76, 178, 233, 0.6), 0 0 0 3px rgba(76, 178, 233, 0.27)),
focus-split-caret-box-shadow: var(--terra-dropdown-button-split-type-caret-focus-box-shadow-neutral, 0 0 0 1px rgba(76, 178, 233, 0.6), 0 0 0 3px rgba(76, 178, 233, 0.27)),
focus-split-outline: var(--terra-dropdown-button-split-type-focus-outline-neutral, 2px dashed #000),
focus-split-caret-outline: var(--terra-dropdown-button-split-type-caret-focus-outline-neutral, 2px dashed #000),
hover-background-color: var(--terra-dropdown-button-hover-background-color-neutral, #b9bbbc),
hover-color: var(--terra-dropdown-button-hover-color-neutral, #000),
hover-split-caret-box-shadow: var(--terra-dropdown-button-split-type-caret-hover-box-shadow-neutral, none),
Expand Down Expand Up @@ -72,8 +72,8 @@ $terra-dropdown-button-ghost-color-scheme: (
focus-background-color: var(--terra-dropdown-button-focus-background-color-ghost, transparent),
focus-border-color: var(--terra-dropdown-button-focus-border-color-ghost, rgba(28, 31, 33, 0.25)),
focus-dropdown-box-shadow: var(--terra-dropdown-button-dropdown-type-focus-box-shadow-ghost, 0 0 0 1px rgba(76, 178, 233, 0.6), 0 0 0 3px rgba(76, 178, 233, 0.27)),
focus-split-box-shadow: var(--terra-dropdown-button-split-type-focus-box-shadow-ghost, 0 0 0 1px rgba(76, 178, 233, 0.6), 0 0 0 3px rgba(76, 178, 233, 0.27)),
focus-split-caret-box-shadow: var(--terra-dropdown-button-split-type-caret-focus-box-shadow-ghost, 0 0 0 1px rgba(76, 178, 233, 0.6), 0 0 0 3px rgba(76, 178, 233, 0.27)),
focus-split-outline: var(--terra-dropdown-button-split-type-focus-outline-ghost, 2px dashed #000),
focus-split-caret-outline: var(--terra-dropdown-button-split-type-caret-focus-outline-ghost, 2px dashed #000),
hover-background-color: var(--terra-dropdown-button-hover-background-color-ghost, rgba(0, 0, 0, 0.05)),
hover-color: var(--terra-dropdown-button-hover-color-ghost, #000),
hover-split-caret-box-shadow: var(--terra-dropdown-button-split-type-caret-hover-box-shadow-ghost, none),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
--terra-dropdown-button-split-type-box-shadow-neutral: none;
--terra-dropdown-button-split-type-font-weight-neutral: 400;
--terra-dropdown-button-split-type-caret-box-shadow-neutral: none;
--terra-dropdown-button-split-type-focus-box-shadow-neutral: 0 0 1px 3px #004c76, 0 0 7px 4px #004c76;
--terra-dropdown-button-split-type-caret-focus-box-shadow-neutral: 0 0 1px 3px #004c76, 0 0 7px 4px #004c76;
--terra-dropdown-button-split-type-focus-outline-neutral: 2px dashed #b2b5b6;
--terra-dropdown-button-split-type-caret-focus-outline-neutral: 2px dashed #b2b5b6;
--terra-dropdown-button-split-type-caret-hover-box-shadow-neutral: none;

// ghost
Expand All @@ -56,8 +56,8 @@
--terra-dropdown-button-split-type-box-shadow-ghost: none;
--terra-dropdown-button-split-type-font-weight-ghost: 400;
--terra-dropdown-button-split-type-caret-box-shadow-ghost: none;
--terra-dropdown-button-split-type-focus-box-shadow-ghost: 0 0 1px 3px #004c76, 0 0 7px 4px #004c76;
--terra-dropdown-button-split-type-caret-focus-box-shadow-ghost: 0 0 1px 3px #004c76, 0 0 7px 4px #004c76;
--terra-dropdown-button-split-type-focus-outline-ghost: 2px dashed #b2b5b6;
--terra-dropdown-button-split-type-caret-focus-outline-ghost: 2px dashed #b2b5b6;
--terra-dropdown-button-split-type-caret-hover-box-shadow-ghost: none;

/* Icons */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
--terra-dropdown-button-split-type-caret-height: 1em;
--terra-dropdown-button-split-type-caret-top: 0.2em;
--terra-dropdown-button-split-type-caret-width: 1em;

// neutral
--terra-dropdown-button-active-background-color-neutral: #9b9fa1;
--terra-dropdown-button-active-border-color-neutral: #6f7477;
Expand All @@ -34,8 +34,8 @@
--terra-dropdown-button-split-type-box-shadow-neutral: inset 0 3rem 1.5rem -2rem #f4f4f4;
--terra-dropdown-button-split-type-font-weight-neutral: 400;
--terra-dropdown-button-split-type-caret-box-shadow-neutral: inset 0 3rem 1.5rem -2rem #f4f4f4;
--terra-dropdown-button-split-type-focus-box-shadow-neutral: inset 0 3rem 1.5rem -2rem #f4f4f4, 0 0 1px 1px rgba(255, 255, 255, 0.65), 0 0 2px 3px rgba(128, 191, 253, 1), 0 0 6px 3px rgba(128, 191, 253, 1);
--terra-dropdown-button-split-type-caret-focus-box-shadow-neutral: inset 0 3rem 1.5rem -2rem #f4f4f4, 0 0 1px 1px rgba(255, 255, 255, 0.65), 0 0 2px 3px rgba(128, 191, 253, 1), 0 0 6px 3px rgba(128, 191, 253, 1);
--terra-dropdown-button-split-type-focus-outline-neutral: 2px dashed #000;
--terra-dropdown-button-split-type-caret-focus-outline-neutral: 2px dashed #000;
--terra-dropdown-button-split-type-caret-hover-box-shadow-neutral: inset 0 3rem 1.5rem -2rem #f4f4f4;

// ghost
Expand All @@ -56,8 +56,8 @@
--terra-dropdown-button-split-type-box-shadow-ghost: none;
--terra-dropdown-button-split-type-font-weight-ghost: 400;
--terra-dropdown-button-split-type-caret-box-shadow-ghost: none;
--terra-dropdown-button-split-type-focus-box-shadow-ghost: 0 0 1px 1px rgba(255, 255, 255, 0.65), 0 0 2px 3px rgba(76, 178, 233, 0.5), 0 0 6px 4px rgba(76, 178, 233, 0.3);
--terra-dropdown-button-split-type-caret-focus-box-shadow-ghost: 0 0 1px 1px rgba(255, 255, 255, 0.65), 0 0 2px 3px rgba(76, 178, 233, 0.5), 0 0 6px 4px rgba(76, 178, 233, 0.3);
--terra-dropdown-button-split-type-focus-outline-ghost: 2px dashed #000;
--terra-dropdown-button-split-type-caret-focus-outline-ghost: 2px dashed #000;
--terra-dropdown-button-split-type-caret-hover-box-shadow-ghost: none;

/* Icons */
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 102a70f

Please sign in to comment.