2024-02-21 10:03:09 +00:00
|
|
|
export default {
|
2024-03-12 08:19:23 +00:00
|
|
|
css: ({ dt }) => `
|
2024-02-21 10:03:09 +00:00
|
|
|
.p-dropdown {
|
|
|
|
display: inline-flex;
|
|
|
|
cursor: pointer;
|
|
|
|
position: relative;
|
|
|
|
user-select: none;
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.background')};
|
|
|
|
border: 1px solid ${dt('dropdown.border.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-21 10:03:09 +00:00
|
|
|
outline-color: transparent;
|
2024-03-13 18:50:24 +00:00
|
|
|
box-shadow: ${dt('dropdown.box.shadow')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown:not(.p-disabled):hover {
|
2024-03-13 18:50:24 +00:00
|
|
|
border-color: ${dt('dropdown.hover.border.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown:not(.p-disabled).p-focus {
|
2024-03-13 18:50:24 +00:00
|
|
|
border-color:${dt('dropdown.focus.border.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
outline: 0 none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown.p-variant-filled {
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.filled.background')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown.p-variant-filled.p-focus {
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.filled.focus.background')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown.p-invalid {
|
2024-03-13 18:50:24 +00:00
|
|
|
border-color: ${dt('dropdown.invalid.border.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown.p-disabled {
|
|
|
|
opacity: 1;
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.disabled.background')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-clear-icon {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -0.5rem;
|
|
|
|
color: #94a3b8;
|
|
|
|
right: 2.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-trigger {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
flex-shrink: 0;
|
|
|
|
background: transparent;
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.toggle.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
width: 2.5rem;
|
2024-03-12 08:19:23 +00:00
|
|
|
border-top-right-radius: ${dt('rounded.base')};
|
|
|
|
border-bottom-right-radius: ${dt('rounded.base')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-label {
|
|
|
|
display: block;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
width: 1%;
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
cursor: pointer;
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
background: transparent;
|
|
|
|
border: 0 none;
|
|
|
|
outline: 0 none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-label.p-placeholder {
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.placeholder.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-clearable .p-dropdown-label {
|
|
|
|
padding-right: 1.75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown.p-disabled .p-dropdown-label {
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.disabled.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-label-empty {
|
|
|
|
overflow: hidden;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
input.p-dropdown-label {
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown .p-dropdown-panel {
|
|
|
|
min-width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-panel {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.overlay.background')};
|
|
|
|
color: ${dt('dropdown.overlay.color')};
|
|
|
|
border: 1px solid ${dt('dropdown.overlay.border.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-21 10:03:09 +00:00
|
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.p-dropdown-panel .p-dropdown-header {
|
|
|
|
padding: 0.5rem 0.5rem 0 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-filter {
|
|
|
|
width: 100%;
|
|
|
|
padding-right: 1.75rem;
|
|
|
|
margin-right: -1.75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-filter-container {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-filter-icon {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -0.5rem;
|
|
|
|
right: 0.75rem;
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.filter.icon.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-items-wrapper {
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item-group {
|
|
|
|
cursor: auto;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0.5rem 0.75rem;
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.item.group.background')};
|
|
|
|
color: ${dt('dropdown.item.group.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-items {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style-type: none;
|
|
|
|
padding: 0.25rem 0.25rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item {
|
|
|
|
cursor: pointer;
|
|
|
|
font-weight: normal;
|
|
|
|
white-space: nowrap;
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin: 2px 0;
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
border: 0 none;
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.item.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
background: transparent;
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
2024-03-13 18:50:24 +00:00
|
|
|
border-radius: ${dt('rounded.sm')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item:first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item:not(.p-highlight):not(.p-disabled).p-focus {
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.item.focus.background')};
|
|
|
|
color: ${dt('dropdown.item.focus.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item.p-highlight {
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.item.selected.background')};
|
|
|
|
color: ${dt('dropdown.item.selected.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-item.p-highlight.p-focus {
|
2024-03-13 18:50:24 +00:00
|
|
|
background: ${dt('dropdown.item.selected.focus.background')};
|
|
|
|
color: ${dt('dropdown.item.selected.focus.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-check-icon {
|
|
|
|
position: relative;
|
|
|
|
margin-left: -0.375rem;
|
|
|
|
margin-right: 0.375rem;
|
2024-03-13 18:50:24 +00:00
|
|
|
color: ${dt('dropdown.checkmark.color')};
|
2024-02-21 10:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dropdown-empty-message {
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-dropdown {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-dropdown .p-dropdown-label {
|
|
|
|
width: 1%;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|