2024-01-30 08:02:22 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
const theme = ({ dt }) => `
|
|
|
|
.p-iconfield {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inputicon {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
2024-05-08 07:32:33 +00:00
|
|
|
margin-top: calc(-1 * (${dt('icon.size')} / 2));
|
2024-05-05 16:14:09 +00:00
|
|
|
color: ${dt('iconfield.icon.color')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-iconfield .p-inputicon:first-child {
|
2024-05-08 07:32:33 +00:00
|
|
|
left: ${dt('form.field.padding.x')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-iconfield .p-inputicon:last-child {
|
2024-05-08 07:32:33 +00:00
|
|
|
right: ${dt('form.field.padding.x')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-iconfield .p-inputtext:last-child {
|
2024-05-08 07:32:33 +00:00
|
|
|
padding-left: calc((${dt('form.field.padding.x')} * 2) + ${dt('icon.size')});
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-iconfield .p-inputtext:first-child {
|
2024-05-08 22:52:39 +00:00
|
|
|
padding-right: calc((${dt('form.field.padding.x')} * 2) + ${dt('icon.size')});
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2024-01-30 08:02:22 +00:00
|
|
|
const classes = {
|
2024-04-08 10:43:16 +00:00
|
|
|
root: 'p-iconfield'
|
2024-01-30 08:02:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'iconfield',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2024-01-30 08:02:22 +00:00
|
|
|
classes
|
|
|
|
});
|