UNPKG

@vaadin/checkbox-group

Version:
488 lines (487 loc) 19.7 kB
{ "schemaVersion": "1.0.0", "readme": "", "modules": [ { "kind": "javascript-module", "path": "vaadin-checkbox-group.js", "declarations": [], "exports": [ { "kind": "js", "name": "*", "declaration": { "name": "*", "module": "src/vaadin-checkbox-group.js" } } ] }, { "kind": "javascript-module", "path": "src/vaadin-checkbox-group-mixin.js", "declarations": [ { "kind": "mixin", "description": "A mixin providing common checkbox-group functionality.", "name": "CheckboxGroupMixin", "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": "method", "name": "checkValidity", "description": "Override method inherited from `ValidateMixin`\nto validate the value array.", "return": { "type": { "text": "boolean" } } }, { "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": "label", "privacy": "public", "type": { "text": "string" }, "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.", "attribute": "label", "inheritedFrom": { "name": "LabelMixin", "package": "@vaadin/field-base/src/label-mixin.js" } }, { "kind": "field", "name": "readonly", "privacy": "public", "type": { "text": "boolean" }, "description": "When true, the user cannot modify the value of the checkbox group.\nThe difference between `disabled` and `readonly` is that in the\nread-only checkbox group, all the checkboxes are also read-only,\nand therefore remain focusable and announced by screen readers.", "attribute": "readonly" }, { "kind": "field", "name": "value", "privacy": "public", "type": { "text": "array" }, "description": "An array containing values of the currently checked checkboxes.\n\nThe array is immutable so toggling checkboxes always results in\ncreating a new array.", "attribute": "value" } ], "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": "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": "label", "type": { "text": "string" }, "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.", "fieldName": "label", "inheritedFrom": { "name": "LabelMixin", "package": "@vaadin/field-base/src/label-mixin.js" } }, { "name": "readonly", "type": { "text": "boolean" }, "description": "When true, the user cannot modify the value of the checkbox group.\nThe difference between `disabled` and `readonly` is that in the\nread-only checkbox group, all the checkboxes are also read-only,\nand therefore remain focusable and announced by screen readers.", "fieldName": "readonly" }, { "name": "value", "type": { "text": "array" }, "description": "An array containing values of the currently checked checkboxes.\n\nThe array is immutable so toggling checkboxes always results in\ncreating a new array.", "fieldName": "value" } ], "mixins": [ { "name": "FieldMixin", "package": "@vaadin/field-base/src/field-mixin.js" }, { "name": "FocusMixin", "package": "@vaadin/a11y-base/src/focus-mixin.js" }, { "name": "DisabledMixin", "package": "@vaadin/a11y-base/src/disabled-mixin.js" } ], "parameters": [ { "name": "superclass" } ] } ], "exports": [ { "kind": "js", "name": "CheckboxGroupMixin", "declaration": { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-mixin.js" } } ] }, { "kind": "javascript-module", "path": "src/vaadin-checkbox-group.js", "declarations": [ { "kind": "class", "description": "`<vaadin-checkbox-group>` is a web component that allows the user to choose several items from a group of binary choices.\n\n```html\n<vaadin-checkbox-group label=\"Export data\">\n <vaadin-checkbox value=\"0\" label=\"Order ID\"></vaadin-checkbox>\n <vaadin-checkbox value=\"1\" label=\"Product name\"></vaadin-checkbox>\n <vaadin-checkbox value=\"2\" label=\"Customer\"></vaadin-checkbox>\n <vaadin-checkbox value=\"3\" label=\"Status\"></vaadin-checkbox>\n</vaadin-checkbox-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`group-field` | The checkbox elements wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", "name": "CheckboxGroup", "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": "method", "name": "checkValidity", "description": "Override method inherited from `ValidateMixin`\nto validate the value array.", "return": { "type": { "text": "boolean" } }, "inheritedFrom": { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-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": "readonly", "privacy": "public", "type": { "text": "boolean" }, "description": "When true, the user cannot modify the value of the checkbox group.\nThe difference between `disabled` and `readonly` is that in the\nread-only checkbox group, all the checkboxes are also read-only,\nand therefore remain focusable and announced by screen readers.", "attribute": "readonly", "inheritedFrom": { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-mixin.js" } }, { "kind": "field", "name": "value", "privacy": "public", "type": { "text": "array" }, "description": "An array containing values of the currently checked checkboxes.\n\nThe array is immutable so toggling checkboxes always results in\ncreating a new array.", "attribute": "value", "inheritedFrom": { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-mixin.js" } } ], "events": [ { "type": { "text": "CustomEvent" }, "description": "Fired when the `invalid` property changes.", "name": "invalid-changed" }, { "type": { "text": "CustomEvent" }, "description": "Fired whenever the field is validated.", "name": "validated" }, { "type": { "text": "CustomEvent" }, "description": "Fired when the `value` property changes.", "name": "value-changed" } ], "mixins": [ { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-mixin.js" }, { "name": "ElementMixin", "package": "@vaadin/component-base/src/element-mixin.js" }, { "name": "ThemableMixin", "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js" }, { "name": "PolylitMixin", "package": "@vaadin/component-base/src/polylit-mixin.js" }, { "name": "LumoInjectionMixin", "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js" } ], "superclass": { "name": "LitElement", "package": "lit" }, "tagName": "vaadin-checkbox-group", "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": "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": "readonly", "type": { "text": "boolean" }, "description": "When true, the user cannot modify the value of the checkbox group.\nThe difference between `disabled` and `readonly` is that in the\nread-only checkbox group, all the checkboxes are also read-only,\nand therefore remain focusable and announced by screen readers.", "fieldName": "readonly", "inheritedFrom": { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-mixin.js" } }, { "name": "value", "type": { "text": "array" }, "description": "An array containing values of the currently checked checkboxes.\n\nThe array is immutable so toggling checkboxes always results in\ncreating a new array.", "fieldName": "value", "inheritedFrom": { "name": "CheckboxGroupMixin", "module": "src/vaadin-checkbox-group-mixin.js" } } ] } ], "exports": [ { "kind": "js", "name": "CheckboxGroup", "declaration": { "name": "CheckboxGroup", "module": "src/vaadin-checkbox-group.js" } } ] } ] }