2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const inlineStyles = {
|
|
|
|
root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined })
|
|
|
|
};
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ instance, props }) => [
|
|
|
|
'p-password p-component p-inputwrapper',
|
|
|
|
{
|
|
|
|
'p-inputwrapper-filled': instance.filled,
|
2024-04-07 10:51:31 +00:00
|
|
|
'p-inputwrapper-focus': instance.focused
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-04-07 10:51:31 +00:00
|
|
|
input: 'p-password-input',
|
|
|
|
hideIcon: 'p-password-toggle-mask-icon p-password-mask-icon',
|
|
|
|
showIcon: 'p-password-toggle-mask-icon p-password-unmask-icon',
|
2024-02-14 07:34:27 +00:00
|
|
|
panel: ({ instance }) => [
|
2024-04-07 10:51:31 +00:00
|
|
|
'p-password-overlay p-component',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-ripple-disabled': instance.$primevue.config.ripple === false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
meter: 'p-password-meter',
|
2024-04-07 10:51:31 +00:00
|
|
|
meterLabel: ({ instance }) => `p-password-meter-value ${instance.meter ? 'p-password-meter-' + instance.meter.strength : ''}`,
|
|
|
|
info: 'p-password-meter-text'
|
2023-10-02 10:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'password',
|
|
|
|
classes,
|
|
|
|
inlineStyles
|
|
|
|
});
|