Skip to content

Commit db34760

Browse files
Merge release/1.30.0 into main branch (#611)
* removing TrackedButton from export (#603) * add aria-live to Toast (#605) * handle setting title prop on Toast (#607) * update focus state to Button and Select (#601) Co-authored-by: Jason Basuil <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0a49fb1 commit db34760

File tree

10 files changed

+181
-69
lines changed

10 files changed

+181
-69
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@user-interviews/ui-design-system",
3-
"version": "1.29.2",
3+
"version": "1.30.0",
44
"dependencies": {
55
"react-bootstrap": "^2.0.2",
66
"react-router-dom": "^5.2.0",

scss/buttons.scss

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020

2121
$primary: $ux-emerald-600;
2222
$danger: $ux-red;
23-
$warning: $ux-yellow-400;
23+
$warning: $ux-yellow-400;
24+
25+
@mixin btn-focus-outline {
26+
box-shadow: none !important;
27+
outline: 0.125rem solid $ux-blue-500;
28+
outline-offset: 0.125rem;
29+
}
2430

2531
@mixin btn-primary {
2632
$btn-primary-background: $primary;
@@ -48,6 +54,10 @@ $warning: $ux-yellow-400;
4854
$btn-primary-active-border,
4955
$btn-primary-active-color,
5056
);
57+
58+
&:focus, &:active {
59+
@include btn-focus-outline;
60+
}
5161
}
5262

5363
@mixin btn-outline-primary {
@@ -77,6 +87,10 @@ $warning: $ux-yellow-400;
7787
background-color: $btn-outline-primary-active-background;
7888
border-color: $btn-outline-primary-active-border-color;
7989
}
90+
91+
&:focus, &:active {
92+
@include btn-focus-outline;
93+
}
8094
}
8195

8296
@mixin btn-danger {
@@ -105,6 +119,10 @@ $warning: $ux-yellow-400;
105119
$btn-danger-active-border,
106120
$btn-danger-active-color,
107121
);
122+
123+
&:focus, &:active {
124+
@include btn-focus-outline;
125+
}
108126
}
109127

110128
@mixin btn-outline-danger {
@@ -134,6 +152,10 @@ $warning: $ux-yellow-400;
134152
background-color: $btn-outline-danger-active-background;
135153
border-color: $btn-outline-danger-active-border-color;
136154
}
155+
156+
&:focus, &:active {
157+
@include btn-focus-outline;
158+
}
137159
}
138160

139161
@mixin btn-warning {
@@ -162,6 +184,10 @@ $warning: $ux-yellow-400;
162184
$btn-warning-active-border,
163185
$btn-warning-active-color,
164186
);
187+
188+
&:focus, &:active {
189+
@include btn-focus-outline;
190+
}
165191
}
166192

167193
@mixin btn-outline-warning {
@@ -191,6 +217,10 @@ $warning: $ux-yellow-400;
191217
background-color: $btn-outline-warning-active-background;
192218
border-color: $btn-outline-warning-active-border-color;
193219
}
220+
221+
&:focus, &:active {
222+
@include btn-focus-outline;
223+
}
194224
}
195225

196226
@mixin btn-transparent {
@@ -223,6 +253,10 @@ $warning: $ux-yellow-400;
223253
&:disabled {
224254
color: $ux-gray-500;
225255
}
256+
257+
&:focus, &:active {
258+
@include btn-focus-outline;
259+
}
226260
}
227261

228262
@mixin btn-outline-transparent {
@@ -252,6 +286,10 @@ $warning: $ux-yellow-400;
252286
background-color: $btn-outline-transparent-active-background;
253287
border-color: $btn-outline-transparent-active-border-color;
254288
}
289+
290+
&:focus, &:active {
291+
@include btn-focus-outline;
292+
}
255293
}
256294

257295
@mixin btn-brand-google {
@@ -284,6 +322,10 @@ $warning: $ux-yellow-400;
284322
&:disabled {
285323
color: $ux-white;
286324
}
325+
326+
&:focus, &:active {
327+
@include btn-focus-outline;
328+
}
287329
}
288330

289331
@mixin btn-brand-facebook {
@@ -316,6 +358,10 @@ $warning: $ux-yellow-400;
316358
&:disabled {
317359
color: $ux-white;
318360
}
361+
362+
&:focus, &:active {
363+
@include btn-focus-outline;
364+
}
319365
}
320366

321367
@mixin btn-brand-linkedin {
@@ -348,6 +394,10 @@ $warning: $ux-yellow-400;
348394
&:disabled {
349395
color: $ux-white;
350396
}
397+
398+
&:focus, &:active {
399+
@include btn-focus-outline;
400+
}
351401
}
352402

353403
@mixin btn-brand-twitter {
@@ -380,5 +430,9 @@ $warning: $ux-yellow-400;
380430
&:disabled {
381431
color: $ux-white;
382432
}
433+
434+
&:focus, &:active {
435+
@include btn-focus-outline;
436+
}
383437
}
384438

0 commit comments

Comments
 (0)