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

187 lines
4.8 KiB
JavaScript
Raw Normal View History

2024-02-21 10:48:13 +00:00
export default {
css: ({ dt }) => `
2024-02-21 10:48:13 +00:00
.p-cascadeselect {
display: inline-flex;
cursor: pointer;
position: relative;
user-select: none;
2024-03-13 18:50:24 +00:00
background: ${dt('cascadeselect.background')};
border: 1px solid ${dt('cascadeselect.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:48:13 +00:00
outline-color: transparent;
2024-03-13 18:50:24 +00:00
box-shadow: ${dt('cascadeselect.box.shadow')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect:not(.p-disabled):hover {
2024-03-13 18:50:24 +00:00
border-color: ${dt('cascadeselect.hover.border.color')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect:not(.p-disabled).p-focus {
2024-03-13 18:50:24 +00:00
border-color: ${dt('cascadeselect.focus.border.color')};
2024-02-21 10:48:13 +00:00
outline: 0 none;
}
.p-cascadeselect.p-variant-filled {
2024-03-13 18:50:24 +00:00
background: ${dt('cascadeselect.filled.background')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect.p-variant-filled.p-focus {
2024-03-13 18:50:24 +00:00
background: ${dt('cascadeselect.filled.focus.background')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect.p-invalid {
2024-03-13 18:50:24 +00:00
border-color: ${dt('cascadeselect.invalid.border.color')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect.p-disabled {
opacity: 1;
2024-03-13 18:50:24 +00:00
background: ${dt('cascadeselect.disabled.background')};
2024-02-21 10:48:13 +00:00
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-dropdown {
2024-02-21 10:48:13 +00:00
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
background: transparent;
2024-03-13 18:50:24 +00:00
color: ${dt('cascadeselect.toggle.color')};
2024-02-21 10:48:13 +00:00
width: 2.5rem;
border-top-right-radius: ${dt('rounded.base')};
border-bottom-right-radius: ${dt('rounded.base')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect-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('cascadeselect.color')};
2024-02-21 10:48:13 +00:00
background: transparent;
border: 0 none;
outline: 0 none;
}
.p-cascadeselect-label.p-placeholder {
2024-03-13 18:50:24 +00:00
color: ${dt('cascadeselect.placeholder.color')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect-clearable .p-cascadeselect-label {
padding-right: 1.75rem;
}
.p-cascadeselect.p-disabled .p-cascadeselect-label {
2024-03-13 18:50:24 +00:00
color: ${dt('cascadeselect.disabled.color')};
2024-02-21 10:48:13 +00:00
}
.p-cascadeselect-label-empty {
overflow: hidden;
2024-03-25 15:11:03 +00:00
visibility: hidden;
2024-02-21 10:48:13 +00:00
}
.p-fluid .p-cascadeselect {
display: flex;
}
.p-fluid .p-cascadeselect .p-cascadeselect-label {
width: 1%;
}
2024-03-25 15:11:03 +00:00
2024-04-06 23:14:45 +00:00
.p-cascadeselect-overlay {
2024-03-25 15:11:03 +00:00
background: ${dt('cascadeselect.overlay.background')};
color: ${dt('cascadeselect.overlay.color')};
border: 1px solid ${dt('cascadeselect.overlay.border.color')};
border-radius: ${dt('rounded.base')};
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect .p-cascadeselect-overlay {
2024-03-25 15:11:03 +00:00
min-width: 100%;
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-item-list {
2024-03-25 15:11:03 +00:00
position: absolute;
min-width: 100%;
z-index: 1;
display: none;
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-list {
2024-03-25 15:11:03 +00:00
margin: 0;
padding: 0;
list-style-type: none;
min-width: 100%;
padding: 0.25rem 0.25rem;
}
.p-cascadeselect-item {
cursor: pointer;
font-weight: normal;
white-space: nowrap;
margin: 2px 0;
border: 0 none;
color: ${dt('cascadeselect.item.color')};
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')};
border-radius: ${dt('rounded.sm')};
}
.p-cascadeselect-item:first-child {
margin-top: 0;
}
.p-cascadeselect-item:last-child {
margin-bottom: 0;
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-item:not(.p-cascadeselect-item-selected):not(.p-disabled).p-focus {
2024-03-25 15:11:03 +00:00
background: ${dt('cascadeselect.item.focus.background')};
color: ${dt('cascadeselect.item.focus.color')};
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-item:not(.p-cascadeselect-item-selected):not(.p-disabled).p-focus .p-cascadeselect-group-icon {
2024-03-25 15:11:03 +00:00
color: ${dt('cascadeselect.item.icon.focus.color')};
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-item-selected {
2024-03-25 15:11:03 +00:00
background: ${dt('cascadeselect.item.selected.background')};
color: ${dt('cascadeselect.item.selected.color')};
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-item-selected.p-focus {
2024-03-25 15:11:03 +00:00
background: ${dt('cascadeselect.item.selected.focus.background')};
color: ${dt('cascadeselect.item.selected.focus.color')};
}
.p-cascadeselect-item-active {
overflow: visible;
2024-03-25 15:19:22 +00:00
background: ${dt('cascadeselect.item.focus.background')};
color: ${dt('cascadeselect.item.focus.color')};
2024-03-25 15:11:03 +00:00
}
2024-04-06 23:14:45 +00:00
.p-cascadeselect-item-active > .p-cascadeselect-item-list {
2024-03-25 15:11:03 +00:00
display: block;
left: 100%;
top: 0;
}
.p-cascadeselect-item-content {
display: flex;
align-items: center;
overflow: hidden;
position: relative;
padding: 0.5rem 0.75rem;
}
.p-cascadeselect-group-icon {
margin-left: auto;
font-size: 0.875rem;
color: ${dt('cascadeselect.item.icon.color')};
}
2024-02-21 10:48:13 +00:00
`
};