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

133 lines
3.1 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-treeselect {
display: inline-flex;
cursor: pointer;
position: relative;
user-select: none;
2024-03-13 18:50:24 +00:00
background: ${dt('treeselect.background')};
border: 1px solid ${dt('treeselect.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('treeselect.box.shadow')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect:not(.p-disabled):hover {
2024-03-13 18:50:24 +00:00
border-color: ${dt('treeselect.hover.border.color')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect:not(.p-disabled).p-focus {
2024-03-13 18:50:24 +00:00
border-color: ${dt('treeselect.focus.border.color')};
2024-02-21 10:48:13 +00:00
outline: 0 none;
}
.p-treeselect.p-variant-filled {
2024-03-13 18:50:24 +00:00
background: ${dt('treeselect.filled.background')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect.p-variant-filled.p-focus {
2024-03-13 18:50:24 +00:00
background: ${dt('treeselect.filled.focus.background')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect.p-invalid {
2024-03-13 18:50:24 +00:00
border-color: ${dt('treeselect.invalid.border.color')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect.p-disabled {
opacity: 1;
2024-03-13 18:50:24 +00:00
background: ${dt('treeselect.disabled.background')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect-trigger {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
background: transparent;
2024-03-13 18:50:24 +00:00
color: ${dt('treeselect.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-treeselect-label-container {
overflow: hidden;
flex: 1 1 auto;
cursor: pointer;
}
.p-treeselect-label {
display: block;
white-space: nowrap;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
padding: 0.5rem 0.75rem;
2024-03-13 18:50:24 +00:00
color: ${dt('treeselect.color')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect-label.p-placeholder {
2024-03-13 18:50:24 +00:00
color: ${dt('treeselect.placeholder.color')};
2024-02-21 10:48:13 +00:00
}
.p-treeselect.p-disabled .p-treeselect-label {
2024-03-13 18:50:24 +00:00
color: ${dt('treeselect.disabled.color')};
2024-02-21 10:48:13 +00:00
}
.p-inputwrapper-filled.p-treeselect.p-treeselect-chip .p-treeselect-label {
padding: 0.25rem 0.25rem;
}
.p-treeselect-label-empty {
overflow: hidden;
visibility: hidden;
}
.p-treeselect-token {
cursor: default;
display: inline-flex;
align-items: center;
flex: 0 0 auto;
padding: 0.25rem 0.75rem;
2024-03-13 18:50:24 +00:00
background: ${dt('treeselect.chip.background')};
color: ${dt('treeselect.chip.color')};
border-radius: ${dt('rounded.sm')};
2024-02-21 10:48:13 +00:00
margin-right: 0.25rem;
}
.p-treeselect-token-icon {
cursor: pointer;
margin-left: 0.375rem;
}
.p-treeselect .p-treeselect-panel {
min-width: 100%;
}
.p-treeselect-panel {
position: absolute;
top: 0;
left: 0;
2024-03-13 18:50:24 +00:00
background: ${dt('treeselect.overlay.background')};
color: ${dt('treeselect.overlay.color')};
border: 1px solid ${dt('treeselect.overlay.border.color')};
border-radius: ${dt('rounded.base')};
2024-02-21 10:48:13 +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-treeselect-empty-message {
padding: 0.5rem 0.75rem;
background: transparent;
}
.p-fluid .p-treeselect {
display: flex;
}
.p-treeselect-panel .p-tree {
padding: 0.25rem 0.25rem;
}
`
};