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;
|
2024-07-17 06:00:52 -04:00
|
|
|
|
2024-06-13 08:44:38 -04:00
|
|
|
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-07-17 06:00:52 -04:00
|
|
|
|
2024-09-25 09:46:02 -04:00
|
|
|
&.dropdown-menu-sm-width {
|
2024-07-17 06:00:52 -04:00
|
|
|
min-width: 160px;
|
|
|
|
}
|
2024-09-04 03:52:08 -04:00
|
|
|
|
|
|
|
.subdued {
|
|
|
|
color: var(--content-disabled);
|
|
|
|
}
|
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-07-17 06:00:52 -04:00
|
|
|
|
2024-02-23 06:23:32 -05:00
|
|
|
display: grid;
|
|
|
|
grid-auto-flow: column;
|
2024-07-17 06:00:52 -04:00
|
|
|
place-content: center start;
|
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
|
|
|
}
|
|
|
|
|
2024-08-22 08:14:22 -04:00
|
|
|
.dropdown-item-leading-icon,
|
|
|
|
.dropdown-item-trailing-icon {
|
|
|
|
.material-symbols {
|
|
|
|
vertical-align: top;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-item-leading-icon-empty {
|
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
}
|
|
|
|
|
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-10-08 10:22:13 -04:00
|
|
|
margin-left: 0;
|
2024-02-23 06:23:32 -05:00
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2024-07-22 04:10:54 -04:00
|
|
|
.dropdown-item-highlighted {
|
2024-05-20 08:50:31 -04:00
|
|
|
background-color: var(--bg-light-secondary);
|
|
|
|
}
|