2021-04-12 13:32:25 +00:00
|
|
|
$base-class: "button";
|
2016-11-08 14:20:35 +00:00
|
|
|
|
2023-01-05 15:23:27 +00:00
|
|
|
@mixin button-focus-outline($offset: 2px) {
|
2024-11-26 22:21:00 +00:00
|
|
|
outline-color: $core-focused-outline;
|
2023-01-05 15:23:27 +00:00
|
|
|
outline-offset: $offset;
|
|
|
|
|
outline-style: solid;
|
|
|
|
|
outline-width: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@mixin button-variant($color, $hover: null, $active: null, $inverse: false) {
|
2016-11-09 15:38:21 +00:00
|
|
|
background-color: $color;
|
|
|
|
|
|
2020-12-19 01:36:39 +00:00
|
|
|
@if $inverse {
|
2025-04-16 13:56:09 +00:00
|
|
|
padding: $pad-small;
|
|
|
|
|
|
2023-01-05 15:23:27 +00:00
|
|
|
&:hover {
|
2025-04-23 18:42:30 +00:00
|
|
|
background-color: rgba($core-fleet-black, 0.05);
|
2023-01-05 15:23:27 +00:00
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
background-color: $ui-fleet-black-10;
|
|
|
|
|
}
|
2020-12-19 01:36:39 +00:00
|
|
|
}
|
|
|
|
|
|
2023-01-05 15:23:27 +00:00
|
|
|
&:focus-visible {
|
|
|
|
|
// need a slightly larger focus outline to accomodate the :after content box
|
|
|
|
|
// that correctly displays the border. We chose this approach as adding a
|
|
|
|
|
// border to the button caused the button to jump around on the screen
|
|
|
|
|
// when it was added and removed.
|
|
|
|
|
@include button-focus-outline($offset: 3px);
|
|
|
|
|
&::after {
|
|
|
|
|
content: "";
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
border: 1px solid $core-vibrant-blue;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
2020-12-19 01:36:39 +00:00
|
|
|
}
|
2021-04-12 13:32:25 +00:00
|
|
|
} @else {
|
2023-01-05 15:23:27 +00:00
|
|
|
&:hover:not(.button--disabled) {
|
2020-12-19 01:36:39 +00:00
|
|
|
background-color: $hover;
|
2023-01-05 15:23:27 +00:00
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
background-color: $active;
|
|
|
|
|
}
|
2016-11-09 15:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
2023-01-05 15:23:27 +00:00
|
|
|
&:focus-visible {
|
2023-04-06 23:45:13 +00:00
|
|
|
@include button-focus-outline();
|
2020-12-19 01:36:39 +00:00
|
|
|
}
|
2016-11-09 14:00:40 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-08 14:20:35 +00:00
|
|
|
.#{$base-class} {
|
2021-04-09 19:04:11 +00:00
|
|
|
@include button-variant($core-vibrant-blue);
|
2021-04-12 13:32:25 +00:00
|
|
|
transition: color 150ms ease-in-out, background 150ms ease-in-out,
|
|
|
|
|
top 50ms ease-in-out, box-shadow 50ms ease-in-out, border 50ms ease-in-out;
|
2016-11-09 15:38:21 +00:00
|
|
|
position: relative;
|
2021-04-09 19:04:11 +00:00
|
|
|
color: $core-white;
|
2017-01-03 20:56:50 +00:00
|
|
|
text-decoration: none;
|
2020-12-19 01:36:39 +00:00
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2021-04-10 00:30:42 +00:00
|
|
|
padding: $pad-small $pad-medium;
|
2023-01-05 15:23:27 +00:00
|
|
|
border-radius: 6px;
|
2021-07-05 19:26:38 +00:00
|
|
|
font-size: $x-small;
|
2023-05-12 13:40:43 +00:00
|
|
|
font-family: "Inter", sans-serif;
|
2016-11-11 14:42:23 +00:00
|
|
|
font-weight: $bold;
|
2020-12-19 01:36:39 +00:00
|
|
|
display: inline-flex;
|
|
|
|
|
height: 38px;
|
2016-11-09 15:38:21 +00:00
|
|
|
top: 0;
|
2016-11-09 14:00:40 +00:00
|
|
|
border: 0;
|
2022-08-29 15:21:37 +00:00
|
|
|
position: relative;
|
2016-11-09 15:38:21 +00:00
|
|
|
cursor: pointer;
|
2016-10-28 21:25:57 +00:00
|
|
|
|
2016-10-27 16:14:30 +00:00
|
|
|
&:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
2016-10-28 21:25:57 +00:00
|
|
|
|
2022-09-14 16:38:25 +00:00
|
|
|
.transparent-text {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.children-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-16 13:56:09 +00:00
|
|
|
&--default {
|
2021-04-14 16:52:15 +00:00
|
|
|
@include button-variant(
|
|
|
|
|
$core-vibrant-blue,
|
|
|
|
|
$core-vibrant-blue-over,
|
|
|
|
|
$core-vibrant-blue-down
|
|
|
|
|
);
|
2022-08-29 15:21:37 +00:00
|
|
|
display: flex;
|
2025-01-24 15:06:49 +00:00
|
|
|
text-wrap: nowrap;
|
2016-11-09 15:38:21 +00:00
|
|
|
}
|
2016-10-31 18:08:54 +00:00
|
|
|
|
2016-11-09 15:38:21 +00:00
|
|
|
&--success {
|
2025-04-16 13:56:09 +00:00
|
|
|
@include button-variant($ui-success, $ui-success-over, $ui-success-down);
|
|
|
|
|
display: flex;
|
|
|
|
|
text-wrap: nowrap;
|
2016-11-09 15:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--alert {
|
2021-04-14 16:52:15 +00:00
|
|
|
@include button-variant(
|
2021-08-09 16:38:13 +00:00
|
|
|
$core-vibrant-red,
|
2021-04-14 16:52:15 +00:00
|
|
|
$core-vibrant-red-over,
|
|
|
|
|
$core-vibrant-red-down
|
|
|
|
|
);
|
2022-08-29 15:21:37 +00:00
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.loading-spinner {
|
|
|
|
|
&__ring {
|
|
|
|
|
div {
|
|
|
|
|
border-color: $ui-error transparent transparent transparent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-11-09 15:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
2025-04-16 13:56:09 +00:00
|
|
|
&--pill {
|
2021-04-12 13:32:25 +00:00
|
|
|
@include button-variant(
|
2021-04-14 16:52:15 +00:00
|
|
|
$ui-off-white,
|
|
|
|
|
$core-vibrant-blue-over,
|
2021-04-12 13:32:25 +00:00
|
|
|
null,
|
|
|
|
|
$inverse: true
|
|
|
|
|
);
|
2021-04-09 19:04:11 +00:00
|
|
|
color: $core-vibrant-blue;
|
|
|
|
|
border: 1px solid $core-vibrant-blue;
|
2021-01-28 20:44:48 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
|
font-size: $xx-small;
|
2021-04-10 00:30:42 +00:00
|
|
|
padding: $pad-xsmall 10px;
|
2021-01-28 20:44:48 +00:00
|
|
|
height: 24px;
|
2021-08-13 21:34:04 +00:00
|
|
|
white-space: nowrap;
|
2021-01-28 20:44:48 +00:00
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
box-shadow: inset 2px 2px 2px rgba(0, 0, 0, 0.25);
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-28 21:31:36 +00:00
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
2021-04-09 19:04:11 +00:00
|
|
|
border: 1px solid $core-vibrant-blue;
|
2021-01-28 20:44:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--text-link {
|
|
|
|
|
@include button-variant(transparent);
|
|
|
|
|
border: 0;
|
|
|
|
|
box-shadow: none;
|
2021-04-09 19:04:11 +00:00
|
|
|
color: $core-vibrant-blue;
|
2021-01-28 20:44:48 +00:00
|
|
|
font-size: $x-small;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: auto;
|
|
|
|
|
line-height: normal;
|
2022-11-28 14:56:34 +00:00
|
|
|
text-align: left;
|
2021-01-28 20:44:48 +00:00
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-28 21:31:36 +00:00
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
2021-04-09 19:04:11 +00:00
|
|
|
color: $core-vibrant-blue-over;
|
2021-01-28 20:44:48 +00:00
|
|
|
background-color: transparent;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
2021-07-10 17:29:27 +00:00
|
|
|
|
2025-04-16 13:56:09 +00:00
|
|
|
&:active {
|
|
|
|
|
color: $core-vibrant-blue-down;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-10 17:29:27 +00:00
|
|
|
&.light-text {
|
|
|
|
|
font-weight: $regular;
|
|
|
|
|
}
|
2021-01-28 20:44:48 +00:00
|
|
|
}
|
|
|
|
|
|
2025-08-01 14:36:03 +00:00
|
|
|
&--text-link-dark {
|
|
|
|
|
@include button-variant(transparent);
|
|
|
|
|
border: 0;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
color: $core-fleet-black;
|
|
|
|
|
font-size: $x-small;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
height: auto;
|
|
|
|
|
line-height: normal;
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-23 18:42:30 +00:00
|
|
|
// &--icon is used for svg icon buttons without text
|
2023-05-25 13:43:44 +00:00
|
|
|
&--text-icon,
|
2025-04-23 18:42:30 +00:00
|
|
|
&--icon {
|
2021-05-18 16:30:57 +00:00
|
|
|
@include button-variant(transparent);
|
2021-08-16 18:47:04 +00:00
|
|
|
padding: 0;
|
2021-05-18 16:30:57 +00:00
|
|
|
border: 0;
|
|
|
|
|
box-shadow: none;
|
2021-08-16 18:47:04 +00:00
|
|
|
color: $core-vibrant-blue;
|
2021-05-18 16:30:57 +00:00
|
|
|
font-size: $x-small;
|
2021-08-16 18:47:04 +00:00
|
|
|
font-weight: $bold;
|
2021-05-18 16:30:57 +00:00
|
|
|
cursor: pointer;
|
2022-04-12 20:31:07 +00:00
|
|
|
white-space: nowrap;
|
2021-05-18 16:30:57 +00:00
|
|
|
|
|
|
|
|
img {
|
2021-08-16 18:47:04 +00:00
|
|
|
transform: scale(0.5);
|
2021-05-18 16:30:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-25 16:26:03 +00:00
|
|
|
&:focus-visible {
|
|
|
|
|
@include button-focus-outline();
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
content: "";
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: absolute;
|
2025-01-20 10:39:46 +00:00
|
|
|
border: 1px solid $core-vibrant-blue;
|
2023-08-25 16:26:03 +00:00
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-28 21:31:36 +00:00
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
2025-04-16 13:56:09 +00:00
|
|
|
color: $core-vibrant-blue-over;
|
2023-08-07 13:25:32 +00:00
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
path {
|
2025-04-16 13:56:09 +00:00
|
|
|
fill: $core-vibrant-blue-over;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
color: $core-vibrant-blue-down;
|
|
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
path {
|
|
|
|
|
fill: $core-vibrant-blue-down;
|
|
|
|
|
}
|
2023-08-07 13:25:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
2023-09-21 17:46:14 +00:00
|
|
|
|
2025-04-23 18:42:30 +00:00
|
|
|
// If .button--icon-stroke is present, use stroke instead of fill
|
|
|
|
|
// Some SVG icons in these buttons contain a `stroke` instead of a `fill`,
|
2024-02-05 16:12:18 +00:00
|
|
|
// so we need to modify that property instead. Adding a custom `fill`
|
|
|
|
|
// could make these icons render incorrectly.
|
2025-04-23 18:42:30 +00:00
|
|
|
&.button--icon-stroke {
|
|
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
|
|
|
|
svg {
|
|
|
|
|
path {
|
|
|
|
|
fill: none; // Prevent fill from interfering
|
|
|
|
|
stroke: $core-vibrant-blue-over;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
&:active {
|
|
|
|
|
svg {
|
|
|
|
|
path {
|
|
|
|
|
stroke: $core-vibrant-blue-down;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-21 17:46:14 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-05-18 16:30:57 +00:00
|
|
|
}
|
2023-05-25 13:43:44 +00:00
|
|
|
|
|
|
|
|
// globally styled gap between text and icon
|
|
|
|
|
.children-wrapper {
|
|
|
|
|
gap: $pad-small;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--icon {
|
2025-04-23 18:42:30 +00:00
|
|
|
height: initial; // Override 38px height
|
2023-05-25 13:43:44 +00:00
|
|
|
svg {
|
|
|
|
|
padding: $pad-small;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-08 14:20:35 +00:00
|
|
|
&--inverse {
|
2021-04-12 13:32:25 +00:00
|
|
|
@include button-variant(
|
2021-04-14 16:52:15 +00:00
|
|
|
$core-white,
|
|
|
|
|
$core-vibrant-blue-over,
|
|
|
|
|
$core-vibrant-blue-down,
|
2021-04-12 13:32:25 +00:00
|
|
|
$inverse: true
|
|
|
|
|
);
|
2021-04-09 19:04:11 +00:00
|
|
|
color: $core-vibrant-blue;
|
2020-12-19 01:36:39 +00:00
|
|
|
box-sizing: border-box;
|
2025-03-20 16:40:43 +00:00
|
|
|
|
|
|
|
|
.children-wrapper {
|
|
|
|
|
gap: $pad-small; // For icons next to text like Pagination buttons
|
|
|
|
|
}
|
2016-10-27 16:14:30 +00:00
|
|
|
}
|
2016-10-28 21:25:57 +00:00
|
|
|
|
2017-01-06 15:30:31 +00:00
|
|
|
&--inverse-alert {
|
2021-04-12 13:32:25 +00:00
|
|
|
@include button-variant(
|
2021-04-14 16:52:15 +00:00
|
|
|
$core-white,
|
|
|
|
|
$core-vibrant-red-over,
|
|
|
|
|
$core-vibrant-red-down,
|
2021-04-12 13:32:25 +00:00
|
|
|
$inverse: true
|
|
|
|
|
);
|
2021-08-09 16:38:13 +00:00
|
|
|
color: $core-vibrant-red;
|
2020-12-19 01:36:39 +00:00
|
|
|
box-sizing: border-box;
|
2017-01-13 23:27:58 +00:00
|
|
|
}
|
|
|
|
|
|
2016-11-09 15:38:21 +00:00
|
|
|
&--disabled {
|
2023-10-04 22:19:26 +00:00
|
|
|
@include disabled;
|
2016-11-09 15:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
2016-11-08 14:20:35 +00:00
|
|
|
&--unstyled {
|
2017-01-13 23:27:58 +00:00
|
|
|
@include button-variant(transparent);
|
2016-10-28 21:25:57 +00:00
|
|
|
border: 0;
|
2016-10-27 16:14:30 +00:00
|
|
|
box-shadow: none;
|
2021-04-09 19:04:11 +00:00
|
|
|
color: $core-fleet-black;
|
2016-12-23 18:40:16 +00:00
|
|
|
cursor: pointer;
|
2016-10-27 16:14:30 +00:00
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
2016-11-09 15:38:21 +00:00
|
|
|
height: auto;
|
|
|
|
|
line-height: normal;
|
2022-09-19 20:47:43 +00:00
|
|
|
font-weight: normal;
|
2016-10-28 21:25:57 +00:00
|
|
|
|
2016-10-27 16:14:30 +00:00
|
|
|
&:active {
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-19 01:36:39 +00:00
|
|
|
|
2021-04-28 15:08:00 +00:00
|
|
|
&--unstyled-modal-query {
|
|
|
|
|
@include button-variant(transparent);
|
|
|
|
|
border: 0;
|
|
|
|
|
box-shadow: none;
|
2021-04-30 16:40:10 +00:00
|
|
|
color: $core-fleet-black;
|
2021-04-28 15:08:00 +00:00
|
|
|
cursor: pointer;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 15px 12px;
|
|
|
|
|
height: auto;
|
|
|
|
|
line-height: normal;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-radius: 0px;
|
2023-01-05 15:23:27 +00:00
|
|
|
border-bottom: 1px solid $ui-fleet-black-10;
|
2021-04-28 15:08:00 +00:00
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-28 21:31:36 +00:00
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
2021-04-30 16:40:10 +00:00
|
|
|
background-color: $ui-vibrant-blue-10;
|
2021-04-28 15:08:00 +00:00
|
|
|
box-shadow: none;
|
|
|
|
|
}
|
2022-09-14 16:38:25 +00:00
|
|
|
|
|
|
|
|
.children-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
flex-direction: column;
|
2023-04-06 23:45:13 +00:00
|
|
|
gap: $pad-xsmall;
|
|
|
|
|
align-items: flex-start;
|
2022-09-14 16:38:25 +00:00
|
|
|
|
|
|
|
|
.info {
|
|
|
|
|
&__header {
|
|
|
|
|
display: block;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
&__data {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-28 15:08:00 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-05 17:36:13 +00:00
|
|
|
&--oversized {
|
|
|
|
|
background-color: $core-fleet-black;
|
|
|
|
|
padding: $pad-large $pad-small;
|
|
|
|
|
font-size: $medium;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2016-10-27 16:14:30 +00:00
|
|
|
}
|