2024-02-23 06:23:32 -05:00
|
|
|
.dropdown {
|
|
|
|
display: inline-flex;
|
|
|
|
}
|
|
|
|
|
2024-06-13 08:44:38 -04:00
|
|
|
.dropdown-header {
|
|
|
|
@include body-xs;
|
|
|
|
padding: var(--spacing-05) var(--spacing-06) var(--spacing-02)
|
|
|
|
var(--spacing-04);
|
|
|
|
}
|
|
|
|
|
2024-02-23 06:23:32 -05:00
|
|
|
.dropdown-menu {
|
2024-05-28 07:40:05 -04:00
|
|
|
@include shadow-md;
|
2024-04-30 04:12:42 -04:00
|
|
|
|
2024-06-04 11:21:05 -04:00
|
|
|
min-width: 240px;
|
2024-02-23 06:23:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item {
|
|
|
|
@include body-sm;
|
2024-04-30 04:12:42 -04:00
|
|
|
|
2024-05-28 07:40:05 -04:00
|
|
|
--bs-dropdown-item-border-radius: var(--border-radius-base);
|
2024-02-23 06:23:32 -05:00
|
|
|
display: grid;
|
|
|
|
grid-auto-flow: column;
|
|
|
|
justify-content: start;
|
2024-05-28 07:40:05 -04:00
|
|
|
align-content: center;
|
2024-02-23 06:23:32 -05:00
|
|
|
min-height: 44px; // a minimum height of 44px to be accessible for touch screens
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: var(--bg-accent-03);
|
2024-05-28 07:40:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:active,
|
|
|
|
&:visited {
|
|
|
|
color: var(--neutral-90);
|
2024-02-23 06:23:32 -05:00
|
|
|
}
|
|
|
|
|
2024-05-16 09:39:34 -04:00
|
|
|
&:hover:not(.active),
|
|
|
|
&:focus:not(.active) {
|
2024-04-30 04:12:42 -04:00
|
|
|
background-color: var(--bg-light-secondary);
|
|
|
|
cursor: pointer;
|
2024-05-16 09:39:34 -04:00
|
|
|
text-decoration: none;
|
2024-04-30 04:12:42 -04:00
|
|
|
}
|
|
|
|
|
2024-02-26 10:11:19 -05:00
|
|
|
&[variant='danger'] {
|
2024-02-23 06:23:32 -05:00
|
|
|
color: var(--content-danger);
|
|
|
|
|
2024-05-16 09:39:34 -04:00
|
|
|
&:hover:not(.active),
|
|
|
|
&:focus:not(.active) {
|
2024-02-23 06:23:32 -05:00
|
|
|
background-color: var(--bg-danger-03);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
background-color: var(--bg-accent-03);
|
|
|
|
color: var(--green-70);
|
|
|
|
}
|
2024-05-28 07:40:05 -04:00
|
|
|
|
|
|
|
&.btn-link {
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
}
|
2024-02-23 06:23:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-divider {
|
2024-05-28 07:40:05 -04:00
|
|
|
border-top-color: var(--border-divider);
|
|
|
|
margin: var(--spacing-01) var(--spacing-03);
|
2024-02-23 06:23:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item-description {
|
|
|
|
@include body-xs;
|
2024-04-30 04:12:42 -04:00
|
|
|
|
2024-02-23 06:23:32 -05:00
|
|
|
color: var(--content-secondary);
|
|
|
|
margin-top: var(--spacing-01);
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item-description-container {
|
|
|
|
grid-auto-flow: row;
|
|
|
|
min-height: 60px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item-trailing-icon {
|
|
|
|
position: absolute;
|
|
|
|
right: 10px;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item-leading-icon {
|
|
|
|
padding-right: var(--spacing-04);
|
2024-07-10 09:34:19 -04:00
|
|
|
|
|
|
|
&.spinner {
|
|
|
|
margin-left: var(--spacing-01);
|
|
|
|
margin-right: var(--spacing-01);
|
|
|
|
}
|
2024-02-23 06:23:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// description text should look disabled when the dropdown item is disabled
|
|
|
|
.dropdown-item.disabled .dropdown-item-description,
|
2024-02-26 10:11:19 -05:00
|
|
|
.dropdown-item[aria-disabled='true'] .dropdown-item-description {
|
2024-02-23 06:23:32 -05:00
|
|
|
background-color: transparent;
|
|
|
|
color: var(--content-disabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
// override disabled styles when the state is active
|
|
|
|
.dropdown-item.active .dropdown-item-description {
|
|
|
|
background-color: initial;
|
|
|
|
color: var(--green-70);
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-button-toggle {
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
padding-right: var(--spacing-05);
|
|
|
|
padding-left: var(--spacing-05);
|
|
|
|
|
2024-02-26 10:11:19 -05:00
|
|
|
&.btn-primary,
|
|
|
|
&.btn-danger {
|
2024-02-23 06:23:32 -05:00
|
|
|
border-left: 1px solid rgb($neutral-90, 0.16);
|
|
|
|
}
|
2024-04-30 04:12:42 -04:00
|
|
|
|
2024-02-23 06:23:32 -05:00
|
|
|
&.btn-secondary {
|
|
|
|
border-left: 1px solid var(--neutral-60);
|
|
|
|
}
|
|
|
|
|
2024-02-26 10:11:19 -05:00
|
|
|
&[disabled],
|
|
|
|
&[aria-disabled='true'] {
|
2024-02-23 06:23:32 -05:00
|
|
|
border-left: 1px solid var(--neutral-10);
|
|
|
|
}
|
|
|
|
}
|
2024-05-20 08:50:31 -04:00
|
|
|
|
|
|
|
.select-dropdown-menu {
|
|
|
|
top: 100%;
|
|
|
|
margin-top: var(--spacing-04);
|
|
|
|
width: 100%;
|
|
|
|
max-height: 200px;
|
|
|
|
overflow: auto;
|
|
|
|
overflow-x: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item--highlighted {
|
|
|
|
background-color: var(--bg-light-secondary);
|
|
|
|
}
|