2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
const theme = ({ dt }) => `
|
|
|
|
.p-chip {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
background: ${dt('chip.background')};
|
|
|
|
color: ${dt('chip.color')};
|
|
|
|
border-radius: 16px;
|
|
|
|
padding: 0.25rem 0.75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-chip-label {
|
|
|
|
line-height: 1.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-chip-icon {
|
|
|
|
line-height: 1.5;
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-chip-image {
|
|
|
|
border-radius: 50%;
|
|
|
|
width: 2rem;
|
|
|
|
height: 2rem;
|
|
|
|
margin-left: -0.5rem;
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-chip:has(.p-chip-remove-icon) {
|
|
|
|
padding-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-chip-remove-icon {
|
|
|
|
line-height: 1.5;
|
|
|
|
cursor: pointer;
|
|
|
|
margin-left: 0.375rem;
|
|
|
|
border-radius: 6px;
|
|
|
|
transition: outline-color ${dt('transition.duration')};
|
|
|
|
outline-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-chip-remove-icon:focus-visible {
|
|
|
|
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
|
|
|
outline-offset: ${dt('focus.ring.offset')};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
2024-04-07 21:49:16 +00:00
|
|
|
root: 'p-chip p-component',
|
|
|
|
image: 'p-chip-image',
|
2023-10-02 10:46:09 +00:00
|
|
|
icon: 'p-chip-icon',
|
2024-04-07 21:49:16 +00:00
|
|
|
label: 'p-chip-label',
|
2023-10-02 10:46:09 +00:00
|
|
|
removeIcon: 'p-chip-remove-icon'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'chip',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-02 10:46:09 +00:00
|
|
|
classes
|
|
|
|
});
|