primevue-mirror/components/lib/password/style/PasswordStyle.js

34 lines
1.0 KiB
JavaScript
Raw Normal View History

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
}
],
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',
panel: ({ instance }) => [
2024-04-07 10:51:31 +00:00
'p-password-overlay p-component',
{
'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'
};
export default BaseStyle.extend({
name: 'password',
classes,
inlineStyles
});