UNPKG

@vaadin/password-field

Version:
728 lines (727 loc) 29.5 kB
{ "schemaVersion": "1.0.0", "readme": "", "modules": [ { "kind": "javascript-module", "path": "vaadin-password-field.js", "declarations": [], "exports": [ { "kind": "js", "name": "*", "declaration": { "name": "*", "module": "src/vaadin-password-field.js" } } ] }, { "kind": "javascript-module", "path": "src/vaadin-password-field-mixin.js", "declarations": [ { "kind": "mixin", "description": "", "name": "PasswordFieldMixin", "members": [ { "kind": "field", "name": "i18n", "privacy": "public", "type": { "text": "object" }, "description": "An object with translated strings used for localization.\nIt has the following structure and default values:\n\n```js\n{\n // Translation of the reveal icon button accessible label\n reveal: 'Show password'\n}\n```", "attribute": "i18n" }, { "kind": "field", "name": "passwordVisible", "privacy": "public", "type": { "text": "boolean" }, "description": "True if the password is visible ([type=text]).", "attribute": "password-visible", "readonly": true }, { "kind": "field", "name": "revealButtonHidden", "privacy": "public", "type": { "text": "boolean" }, "description": "Set to true to hide the eye icon which toggles the password visibility.", "attribute": "reveal-button-hidden" } ], "events": [ { "name": "change", "type": { "text": "CustomEvent" } } ], "attributes": [ { "name": "password-visible", "type": { "text": "boolean" }, "description": "True if the password is visible ([type=text]).", "fieldName": "passwordVisible" }, { "name": "reveal-button-hidden", "type": { "text": "boolean" }, "description": "Set to true to hide the eye icon which toggles the password visibility.", "fieldName": "revealButtonHidden" } ], "mixins": [ { "name": "SlotStylesMixin", "package": "@vaadin/component-base/src/slot-styles-mixin.js" }, { "name": "DisabledMixin", "package": "@vaadin/a11y-base/src/disabled-mixin.js" }, { "name": "FocusMixin", "package": "@vaadin/a11y-base/src/focus-mixin.js" }, { "name": "InputMixin", "package": "@vaadin/field-base/src/input-mixin.js" } ], "parameters": [ { "name": "superClass" } ] } ], "exports": [ { "kind": "js", "name": "PasswordFieldMixin", "declaration": { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } } ] }, { "kind": "javascript-module", "path": "src/vaadin-password-field.js", "declarations": [ { "kind": "class", "description": "`<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n\n```html\n<vaadin-password-field label=\"Password\"></vaadin-password-field>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`field-button` | Set on both clear and reveal buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`reveal-button` | The eye icon which toggles the password visibility\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`input-prevented` | Temporarily set when invalid input is prevented\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`password-visible` | Set when the password is visible\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", "name": "PasswordField", "members": [ { "kind": "field", "name": "accessibleName", "privacy": "public", "type": { "text": "string" }, "description": "String used to label the component to screen reader users.", "attribute": "accessible-name", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "kind": "field", "name": "accessibleNameRef", "privacy": "public", "type": { "text": "string" }, "description": "Id of the element used as label of the component to screen reader users.", "attribute": "accessible-name-ref", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "kind": "field", "name": "allowedCharPattern", "privacy": "public", "type": { "text": "string" }, "description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`", "attribute": "allowed-char-pattern", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "kind": "field", "name": "autocapitalize", "privacy": "public", "type": { "text": "string" }, "description": "This is a property supported by Safari and Chrome that is used to control whether\nautocapitalization should be enabled when the user is entering/editing the text.\nPossible values are:\ncharacters: Characters capitalization.\nwords: Words capitalization.\nsentences: Sentences capitalization.\nnone: No capitalization.", "attribute": "autocapitalize", "inheritedFrom": { "name": "InputFieldMixin", "package": "@vaadin/field-base/src/input-field-mixin.js" } }, { "kind": "field", "name": "autocomplete", "privacy": "public", "type": { "text": "string" }, "description": "Whether the value of the control can be automatically completed by the browser.\nList of available options at:\nhttps://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete", "attribute": "autocomplete", "inheritedFrom": { "name": "InputFieldMixin", "package": "@vaadin/field-base/src/input-field-mixin.js" } }, { "kind": "field", "name": "autocorrect", "privacy": "public", "type": { "text": "string" }, "description": "This is a property supported by Safari that is used to control whether\nautocorrection should be enabled when the user is entering/editing the text.\nPossible values are:\non: Enable autocorrection.\noff: Disable autocorrection.", "attribute": "autocorrect", "inheritedFrom": { "name": "InputFieldMixin", "package": "@vaadin/field-base/src/input-field-mixin.js" } }, { "kind": "field", "name": "autoselect", "privacy": "public", "type": { "text": "boolean" }, "description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.", "attribute": "autoselect", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "kind": "field", "name": "clearButtonVisible", "privacy": "public", "type": { "text": "boolean" }, "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.", "attribute": "clear-button-visible", "inheritedFrom": { "name": "ClearButtonMixin", "package": "@vaadin/field-base/src/clear-button-mixin.js" } }, { "kind": "field", "name": "errorMessage", "privacy": "public", "type": { "text": "string" }, "description": "Error to show when the field is invalid.", "attribute": "error-message", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "kind": "field", "name": "helperText", "privacy": "public", "type": { "text": "string" }, "description": "String used for the helper text.", "attribute": "helper-text", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "kind": "field", "name": "i18n", "privacy": "public", "type": { "text": "object" }, "description": "An object with translated strings used for localization.\nIt has the following structure and default values:\n\n```js\n{\n // Translation of the reveal icon button accessible label\n reveal: 'Show password'\n}\n```", "attribute": "i18n", "inheritedFrom": { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } }, { "kind": "field", "name": "maxlength", "privacy": "public", "type": { "text": "number" }, "description": "Maximum number of characters (in Unicode code points) that the user can enter.", "attribute": "maxlength", "inheritedFrom": { "name": "TextFieldMixin", "package": "@vaadin/text-field/src/vaadin-text-field-mixin.js" } }, { "kind": "field", "name": "minlength", "privacy": "public", "type": { "text": "number" }, "description": "Minimum number of characters (in Unicode code points) that the user can enter.", "attribute": "minlength", "inheritedFrom": { "name": "TextFieldMixin", "package": "@vaadin/text-field/src/vaadin-text-field-mixin.js" } }, { "kind": "field", "name": "name", "privacy": "public", "type": { "text": "string" }, "description": "The name of this field.", "attribute": "name", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "kind": "field", "name": "passwordVisible", "privacy": "public", "type": { "text": "boolean" }, "description": "True if the password is visible ([type=text]).", "attribute": "password-visible", "readonly": true, "inheritedFrom": { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } }, { "kind": "field", "name": "pattern", "privacy": "public", "type": { "text": "string" }, "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.", "attribute": "pattern", "inheritedFrom": { "name": "TextFieldMixin", "package": "@vaadin/text-field/src/vaadin-text-field-mixin.js" } }, { "kind": "field", "name": "placeholder", "privacy": "public", "type": { "text": "string" }, "description": "A hint to the user of what can be entered in the field.", "attribute": "placeholder", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "kind": "field", "name": "readonly", "privacy": "public", "type": { "text": "boolean" }, "description": "When present, it specifies that the field is read-only.", "attribute": "readonly", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "kind": "field", "name": "revealButtonHidden", "privacy": "public", "type": { "text": "boolean" }, "description": "Set to true to hide the eye icon which toggles the password visibility.", "attribute": "reveal-button-hidden", "inheritedFrom": { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } }, { "kind": "field", "name": "title", "privacy": "public", "type": { "text": "string" }, "description": "The text usually displayed in a tooltip popup when the mouse is over the field.", "attribute": "title", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } } ], "events": [ { "type": { "text": "Event" }, "description": "Fired when the user commits a value change.", "name": "change", "inheritedFrom": { "name": "TextField", "package": "@vaadin/text-field/src/vaadin-text-field.js" } }, { "type": { "text": "Event" }, "description": "Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.", "name": "input", "inheritedFrom": { "name": "TextField", "package": "@vaadin/text-field/src/vaadin-text-field.js" } }, { "type": { "text": "CustomEvent" }, "description": "Fired when the `invalid` property changes.", "name": "invalid-changed", "inheritedFrom": { "name": "TextField", "package": "@vaadin/text-field/src/vaadin-text-field.js" } }, { "type": { "text": "CustomEvent" }, "description": "Fired whenever the field is validated.", "name": "validated", "inheritedFrom": { "name": "TextField", "package": "@vaadin/text-field/src/vaadin-text-field.js" } }, { "type": { "text": "CustomEvent" }, "description": "Fired when the `value` property changes.", "name": "value-changed", "inheritedFrom": { "name": "TextField", "package": "@vaadin/text-field/src/vaadin-text-field.js" } } ], "mixins": [ { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } ], "superclass": { "name": "TextField", "package": "@vaadin/text-field/src/vaadin-text-field.js" }, "tagName": "vaadin-password-field", "customElement": true, "attributes": [ { "name": "accessible-name", "type": { "text": "string" }, "description": "String used to label the component to screen reader users.", "fieldName": "accessibleName", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "name": "accessible-name-ref", "type": { "text": "string" }, "description": "Id of the element used as label of the component to screen reader users.", "fieldName": "accessibleNameRef", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "name": "allowed-char-pattern", "type": { "text": "string" }, "description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`", "fieldName": "allowedCharPattern", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "name": "autocapitalize", "type": { "text": "string" }, "description": "This is a property supported by Safari and Chrome that is used to control whether\nautocapitalization should be enabled when the user is entering/editing the text.\nPossible values are:\ncharacters: Characters capitalization.\nwords: Words capitalization.\nsentences: Sentences capitalization.\nnone: No capitalization.", "fieldName": "autocapitalize", "inheritedFrom": { "name": "InputFieldMixin", "package": "@vaadin/field-base/src/input-field-mixin.js" } }, { "name": "autocomplete", "type": { "text": "string" }, "description": "Whether the value of the control can be automatically completed by the browser.\nList of available options at:\nhttps://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete", "fieldName": "autocomplete", "inheritedFrom": { "name": "InputFieldMixin", "package": "@vaadin/field-base/src/input-field-mixin.js" } }, { "name": "autocorrect", "type": { "text": "string" }, "description": "This is a property supported by Safari that is used to control whether\nautocorrection should be enabled when the user is entering/editing the text.\nPossible values are:\non: Enable autocorrection.\noff: Disable autocorrection.", "fieldName": "autocorrect", "inheritedFrom": { "name": "InputFieldMixin", "package": "@vaadin/field-base/src/input-field-mixin.js" } }, { "name": "autoselect", "type": { "text": "boolean" }, "description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.", "fieldName": "autoselect", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "name": "clear-button-visible", "type": { "text": "boolean" }, "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.", "fieldName": "clearButtonVisible", "inheritedFrom": { "name": "ClearButtonMixin", "package": "@vaadin/field-base/src/clear-button-mixin.js" } }, { "name": "error-message", "type": { "text": "string" }, "description": "Error to show when the field is invalid.", "fieldName": "errorMessage", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "name": "helper-text", "type": { "text": "string" }, "description": "String used for the helper text.", "fieldName": "helperText", "inheritedFrom": { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" } }, { "name": "maxlength", "type": { "text": "number" }, "description": "Maximum number of characters (in Unicode code points) that the user can enter.", "fieldName": "maxlength", "inheritedFrom": { "name": "TextFieldMixin", "package": "@vaadin/text-field/src/vaadin-text-field-mixin.js" } }, { "name": "minlength", "type": { "text": "number" }, "description": "Minimum number of characters (in Unicode code points) that the user can enter.", "fieldName": "minlength", "inheritedFrom": { "name": "TextFieldMixin", "package": "@vaadin/text-field/src/vaadin-text-field-mixin.js" } }, { "name": "name", "type": { "text": "string" }, "description": "The name of this field.", "fieldName": "name", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "name": "password-visible", "type": { "text": "boolean" }, "description": "True if the password is visible ([type=text]).", "fieldName": "passwordVisible", "inheritedFrom": { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } }, { "name": "pattern", "type": { "text": "string" }, "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.", "fieldName": "pattern", "inheritedFrom": { "name": "TextFieldMixin", "package": "@vaadin/text-field/src/vaadin-text-field-mixin.js" } }, { "name": "placeholder", "type": { "text": "string" }, "description": "A hint to the user of what can be entered in the field.", "fieldName": "placeholder", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "name": "readonly", "type": { "text": "boolean" }, "description": "When present, it specifies that the field is read-only.", "fieldName": "readonly", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } }, { "name": "reveal-button-hidden", "type": { "text": "boolean" }, "description": "Set to true to hide the eye icon which toggles the password visibility.", "fieldName": "revealButtonHidden", "inheritedFrom": { "name": "PasswordFieldMixin", "module": "src/vaadin-password-field-mixin.js" } }, { "name": "title", "type": { "text": "string" }, "description": "The text usually displayed in a tooltip popup when the mouse is over the field.", "fieldName": "title", "inheritedFrom": { "name": "InputControlMixin", "package": "@vaadin/field-base/src/input-control-mixin.js" } } ] } ], "exports": [ { "kind": "js", "name": "PasswordField", "declaration": { "name": "PasswordField", "module": "src/vaadin-password-field.js" } } ] } ] }