primevue-mirror/components/lib/themes/primeone/base/select/index.js

216 lines
4.8 KiB
JavaScript
Raw Normal View History

2024-02-21 10:03:09 +00:00
export default {
css: ({ dt }) => `
2024-04-07 09:39:33 +00:00
.p-select {
2024-02-21 10:03:09 +00:00
display: inline-flex;
cursor: pointer;
position: relative;
user-select: none;
2024-04-18 14:17:41 +00:00
background: ${dt('select.background')};
border: 1px solid ${dt('select.border.color')};
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-04-18 14:17:41 +00:00
box-shadow: ${dt('select.box.shadow')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select:not(.p-disabled):hover {
2024-04-18 14:17:41 +00:00
border-color: ${dt('select.hover.border.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select:not(.p-disabled).p-focus {
2024-04-18 14:17:41 +00:00
border-color:${dt('select.focus.border.color')};
2024-02-21 10:03:09 +00:00
outline: 0 none;
}
2024-04-07 09:39:33 +00:00
.p-select.p-variant-filled {
2024-04-18 14:17:41 +00:00
background: ${dt('select.filled.background')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select.p-variant-filled.p-focus {
2024-04-18 14:17:41 +00:00
background: ${dt('select.filled.focus.background')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select.p-invalid {
2024-04-18 14:17:41 +00:00
border-color: ${dt('select.invalid.border.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select.p-disabled {
2024-02-21 10:03:09 +00:00
opacity: 1;
2024-04-18 14:17:41 +00:00
background: ${dt('select.disabled.background')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-clear-icon {
2024-02-21 10:03:09 +00:00
position: absolute;
top: 50%;
margin-top: -0.5rem;
color: #94a3b8;
right: 2.5rem;
}
2024-04-07 09:39:33 +00:00
.p-select-dropdown {
2024-02-21 10:03:09 +00:00
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
background: transparent;
2024-04-18 14:17:41 +00:00
color: ${dt('select.toggle.color')};
2024-02-21 10:03:09 +00:00
width: 2.5rem;
border-top-right-radius: ${dt('rounded.base')};
border-bottom-right-radius: ${dt('rounded.base')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-label {
2024-02-21 10:03:09 +00:00
display: block;
white-space: nowrap;
overflow: hidden;
flex: 1 1 auto;
width: 1%;
padding: 0.5rem 0.75rem;
text-overflow: ellipsis;
cursor: pointer;
2024-04-18 14:17:41 +00:00
color: ${dt('select.color')};
2024-02-21 10:03:09 +00:00
background: transparent;
border: 0 none;
outline: 0 none;
}
2024-04-07 09:39:33 +00:00
.p-select-label.p-placeholder {
2024-04-18 14:17:41 +00:00
color: ${dt('select.placeholder.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select:has(.p-select-clear-icon) .p-select-label {
2024-02-21 10:03:09 +00:00
padding-right: 1.75rem;
}
2024-04-07 09:39:33 +00:00
.p-select.p-disabled .p-select-label {
2024-04-18 14:17:41 +00:00
color: ${dt('select.disabled.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-label-empty {
2024-02-21 10:03:09 +00:00
overflow: hidden;
opacity: 0;
}
2024-04-07 09:39:33 +00:00
input.p-select-label {
2024-02-21 10:03:09 +00:00
cursor: default;
}
2024-04-07 09:39:33 +00:00
.p-select .p-select-overlay {
2024-02-21 10:03:09 +00:00
min-width: 100%;
}
2024-04-07 09:39:33 +00:00
.p-select-overlay {
2024-02-21 10:03:09 +00:00
position: absolute;
top: 0;
left: 0;
2024-04-18 14:17:41 +00:00
background: ${dt('select.overlay.background')};
color: ${dt('select.overlay.color')};
border: 1px solid ${dt('select.overlay.border.color')};
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);
}
2024-04-07 09:39:33 +00:00
.p-select-header {
2024-02-21 10:03:09 +00:00
padding: 0.5rem 0.5rem 0 0.5rem;
}
2024-04-07 09:39:33 +00:00
.p-select-filter {
2024-02-21 10:03:09 +00:00
width: 100%;
padding-right: 1.75rem;
margin-right: -1.75rem;
}
2024-04-07 09:39:33 +00:00
.p-select-filter-container {
2024-02-21 10:03:09 +00:00
position: relative;
}
2024-04-07 09:39:33 +00:00
.p-select-filter-icon {
2024-02-21 10:03:09 +00:00
position: absolute;
top: 50%;
margin-top: -0.5rem;
right: 0.75rem;
2024-04-18 14:17:41 +00:00
color: ${dt('select.filter.icon.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-list-container {
2024-02-21 10:03:09 +00:00
overflow: auto;
}
2024-04-07 09:39:33 +00:00
.p-select-option-group {
2024-02-21 10:03:09 +00:00
cursor: auto;
margin: 0;
padding: 0.5rem 0.75rem;
2024-04-18 14:17:41 +00:00
background: ${dt('select.item.group.background')};
color: ${dt('select.item.group.color')};
2024-02-21 10:03:09 +00:00
font-weight: 600;
}
2024-04-07 09:39:33 +00:00
.p-select-list {
2024-02-21 10:03:09 +00:00
margin: 0;
padding: 0;
list-style-type: none;
padding: 0.25rem 0.25rem;
}
2024-04-07 09:39:33 +00:00
.p-select-option {
2024-02-21 10:03:09 +00:00
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-04-18 14:17:41 +00:00
color: ${dt('select.item.color')};
2024-02-21 10:03:09 +00:00
background: transparent;
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
}
2024-04-07 09:39:33 +00:00
.p-select-option:first-child {
2024-02-21 10:03:09 +00:00
margin-top: 0;
}
2024-04-07 09:39:33 +00:00
.p-select-option:last-child {
2024-02-21 10:03:09 +00:00
margin-bottom: 0;
}
2024-04-07 09:39:33 +00:00
.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {
2024-04-18 14:17:41 +00:00
background: ${dt('select.item.focus.background')};
color: ${dt('select.item.focus.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-option.p-select-option-selected {
2024-04-18 14:17:41 +00:00
background: ${dt('select.item.selected.background')};
color: ${dt('select.item.selected.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-option.p-select-option-selected.p-focus {
2024-04-18 14:17:41 +00:00
background: ${dt('select.item.selected.focus.background')};
color: ${dt('select.item.selected.focus.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-option-check-icon {
2024-02-21 10:03:09 +00:00
position: relative;
margin-left: -0.375rem;
margin-right: 0.375rem;
2024-04-18 14:17:41 +00:00
color: ${dt('select.checkmark.color')};
2024-02-21 10:03:09 +00:00
}
2024-04-07 09:39:33 +00:00
.p-select-empty-message {
2024-02-21 10:03:09 +00:00
padding: 0.5rem 0.75rem;
background: transparent;
}
2024-04-07 09:39:33 +00:00
.p-fluid .p-select {
2024-02-21 10:03:09 +00:00
display: flex;
}
2024-04-07 09:39:33 +00:00
.p-fluid .p-select .p-select-label {
2024-02-21 10:03:09 +00:00
width: 1%;
}
`
};