diff --git a/analysis.json b/analysis.json index ba990cd..9338cb8 100644 --- a/analysis.json +++ b/analysis.json @@ -6,14 +6,14 @@ "description": "", "summary": "", "sourceRange": { - "file": "src/vaadin-checkbox.html", + "file": "src/vaadin-checkbox-group.html", "start": { - "line": 279, + "line": 159, "column": 6 }, "end": { - "line": 279, - "column": 54 + "line": 159, + "column": 42 } }, "elements": [ @@ -51,11 +51,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 50, + "line": 55, "column": 8 }, "end": { - "line": 52, + "line": 57, "column": 9 } }, @@ -74,11 +74,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 57, + "line": 62, "column": 8 }, "end": { - "line": 59, + "line": 64, "column": 9 } }, @@ -97,11 +97,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 64, + "line": 69, "column": 8 }, "end": { - "line": 68, + "line": 73, "column": 9 } }, @@ -121,11 +121,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 70, + "line": 75, "column": 8 }, "end": { - "line": 72, + "line": 77, "column": 9 } }, @@ -276,11 +276,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 118, + "line": 123, "column": 4 }, "end": { - "line": 123, + "line": 128, "column": 5 } }, @@ -298,11 +298,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 128, + "line": 133, "column": 4 }, "end": { - "line": 139, + "line": 144, "column": 5 } }, @@ -320,11 +320,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 141, + "line": 146, "column": 4 }, "end": { - "line": 155, + "line": 160, "column": 5 } }, @@ -346,11 +346,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 157, + "line": 162, "column": 4 }, "end": { - "line": 159, + "line": 164, "column": 5 } }, @@ -372,11 +372,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 161, + "line": 166, "column": 4 }, "end": { - "line": 163, + "line": 168, "column": 5 } }, @@ -394,11 +394,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 174, + "line": 179, "column": 4 }, "end": { - "line": 181, + "line": 186, "column": 5 } }, @@ -420,11 +420,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 187, + "line": 192, "column": 4 }, "end": { - "line": 194, + "line": 199, "column": 5 } }, @@ -442,11 +442,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 201, + "line": 206, "column": 4 }, "end": { - "line": 204, + "line": 209, "column": 5 } }, @@ -464,11 +464,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 206, + "line": 211, "column": 4 }, "end": { - "line": 219, + "line": 224, "column": 5 } }, @@ -490,11 +490,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 221, + "line": 226, "column": 4 }, "end": { - "line": 237, + "line": 242, "column": 5 } }, @@ -653,17 +653,38 @@ "type": "void" } }, + { + "name": "__interactionsAllowed", + "description": "True if users' interactions (mouse or keyboard)\nshould toggle the checkbox", + "privacy": "private", + "sourceRange": { + "start": { + "line": 247, + "column": 8 + }, + "end": { + "line": 258, + "column": 9 + } + }, + "metadata": {}, + "params": [ + { + "name": "e" + } + ] + }, { "name": "_handleClick", "description": "", "privacy": "protected", "sourceRange": { "start": { - "line": 243, + "line": 260, "column": 8 }, "end": { - "line": 260, + "line": 277, "column": 9 } }, @@ -683,11 +704,11 @@ "privacy": "protected", "sourceRange": { "start": { - "line": 262, + "line": 279, "column": 8 }, "end": { - "line": 265, + "line": 282, "column": 9 } }, @@ -699,6 +720,54 @@ } ], "staticMethods": [ + { + "name": "finalize", + "description": "", + "privacy": "protected", + "sourceRange": { + "file": "../../vaadin-themable-mixin/vaadin-themable-mixin.html", + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "Vaadin.ThemableMixin" + }, + { + "name": "_includeMatchingThemes", + "description": "", + "privacy": "protected", + "sourceRange": { + "file": "../../vaadin-themable-mixin/vaadin-themable-mixin.html", + "start": { + "line": 33, + "column": 4 + }, + "end": { + "line": 58, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "template" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "Vaadin.ThemableMixin" + }, { "name": "_includeStyle", "description": "", @@ -706,11 +775,11 @@ "sourceRange": { "file": "../../vaadin-themable-mixin/vaadin-themable-mixin.html", "start": { - "line": 46, + "line": 61, "column": 4 }, "end": { - "line": 50, + "line": 67, "column": 5 } }, @@ -718,6 +787,9 @@ "params": [ { "name": "moduleName" + }, + { + "name": "template" } ], "return": { @@ -739,7 +811,7 @@ "column": 6 }, "end": { - "line": 272, + "line": 289, "column": 7 } }, @@ -753,11 +825,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 50, + "line": 55, "column": 8 }, "end": { - "line": 52, + "line": 57, "column": 9 } }, @@ -771,11 +843,11 @@ "sourceRange": { "file": "../../vaadin-control-state-mixin/vaadin-control-state-mixin.html", "start": { - "line": 64, + "line": 69, "column": 8 }, "end": { - "line": 68, + "line": 73, "column": 9 } }, @@ -879,6 +951,382 @@ "Vaadin.ThemableMixin", "Polymer.GestureEventListeners" ] + }, + { + "description": "`` is a Polymer element for grouping vaadin-checkboxes.\n\n```html\n\n Foo\n Bar\n Baz\n\n```\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-----------|-------------|------------\n`disabled` | Set when the checkbox group and its children are disabled. | :host\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)", + "summary": "", + "path": "src/vaadin-checkbox-group.html", + "properties": [ + { + "name": "_checkboxes", + "type": "?", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 115, + "column": 9 + } + }, + "metadata": { + "polymer": { + "readOnly": true + } + } + }, + { + "name": "disabled", + "type": "boolean | null | undefined", + "description": "The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled.", + "privacy": "public", + "sourceRange": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 58, + "column": 13 + } + }, + "metadata": { + "polymer": { + "observer": "\"_disabledChanged\"", + "attributeType": "Boolean" + } + } + }, + { + "name": "value", + "type": "Array | null | undefined", + "description": "Value of the checkbox group.", + "privacy": "public", + "sourceRange": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 67, + "column": 13 + } + }, + "metadata": { + "polymer": { + "notify": true, + "attributeType": "Array" + } + }, + "defaultValue": "[]" + } + ], + "methods": [ + { + "name": "connectedCallback", + "description": "", + "privacy": "private", + "sourceRange": { + "start": { + "line": 80, + "column": 8 + }, + "end": { + "line": 105, + "column": 9 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + } + }, + { + "name": "ready", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 107, + "column": 8 + }, + "end": { + "line": 111, + "column": 9 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + } + }, + { + "name": "_filterCheckboxes", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 117, + "column": 8 + }, + "end": { + "line": 120, + "column": 9 + } + }, + "metadata": {}, + "params": [ + { + "name": "nodes" + } + ] + }, + { + "name": "_disabledChanged", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 122, + "column": 8 + }, + "end": { + "line": 126, + "column": 9 + } + }, + "metadata": {}, + "params": [ + { + "name": "disabled" + } + ], + "return": { + "type": "void" + } + }, + { + "name": "_changeSelectedCheckbox", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 128, + "column": 8 + }, + "end": { + "line": 140, + "column": 9 + } + }, + "metadata": {}, + "params": [ + { + "name": "checkbox" + } + ], + "return": { + "type": "void" + } + }, + { + "name": "_valueChanged", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 142, + "column": 8 + }, + "end": { + "line": 150, + "column": 9 + } + }, + "metadata": {}, + "params": [ + { + "name": "newV" + }, + { + "name": "oldV" + } + ], + "return": { + "type": "void" + } + } + ], + "staticMethods": [ + { + "name": "finalize", + "description": "", + "privacy": "protected", + "sourceRange": { + "file": "../../vaadin-themable-mixin/vaadin-themable-mixin.html", + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "Vaadin.ThemableMixin" + }, + { + "name": "_includeMatchingThemes", + "description": "", + "privacy": "protected", + "sourceRange": { + "file": "../../vaadin-themable-mixin/vaadin-themable-mixin.html", + "start": { + "line": 33, + "column": 4 + }, + "end": { + "line": 58, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "template" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "Vaadin.ThemableMixin" + }, + { + "name": "_includeStyle", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../../vaadin-themable-mixin/vaadin-themable-mixin.html", + "start": { + "line": 61, + "column": 4 + }, + "end": { + "line": 67, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "moduleName" + }, + { + "name": "template" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "Vaadin.ThemableMixin" + } + ], + "demos": [ + { + "url": "demo/index.html", + "description": "" + } + ], + "metadata": {}, + "sourceRange": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 152, + "column": 7 + } + }, + "privacy": "public", + "superclass": "HTMLElement", + "name": "Vaadin.CheckboxGroupElement", + "attributes": [ + { + "name": "disabled", + "description": "The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled.", + "sourceRange": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 58, + "column": 13 + } + }, + "metadata": {}, + "type": "boolean | null | undefined" + }, + { + "name": "value", + "description": "Value of the checkbox group.", + "sourceRange": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 67, + "column": 13 + } + }, + "metadata": {}, + "type": "Array | null | undefined" + } + ], + "events": [ + { + "type": "CustomEvent", + "name": "value-changed", + "description": "Fired when the `value` property changes.", + "metadata": {} + } + ], + "styling": { + "cssVariables": [], + "selectors": [] + }, + "slots": [ + { + "description": "", + "name": "", + "range": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 27 + } + } + } + ], + "tagname": "vaadin-checkbox-group", + "mixins": [ + "Vaadin.ThemableMixin" + ] } ] } diff --git a/bower.json b/bower.json index de137a1..034d9fe 100644 --- a/bower.json +++ b/bower.json @@ -37,6 +37,7 @@ "webcomponentsjs": "^1.0.1", "web-component-tester": "^6.1.5", "vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^2.0.0", - "iron-form": "^2.0.1" + "iron-form": "^2.0.1", + "vaadin-button": "^2.0.1" } } diff --git a/demo/checkbox-group-demos.html b/demo/checkbox-group-demos.html new file mode 100644 index 0000000..aad8afa --- /dev/null +++ b/demo/checkbox-group-demos.html @@ -0,0 +1,111 @@ + + + + diff --git a/demo/demos.json b/demo/demos.json index d4f9402..4b6f1d2 100644 --- a/demo/demos.json +++ b/demo/demos.json @@ -33,5 +33,16 @@ "image": "" } } + , + { + "name": "Vaadin Checkbox Group", + "url": "checkbox-group-demos", + "src": "checkbox-group-demos.html", + "meta": { + "title": "vaadin-checkbox-group Examples", + "description": "", + "image": "" + } + } ] } diff --git a/demo/index.html b/demo/index.html index ce71927..34eefed 100644 --- a/demo/index.html +++ b/demo/index.html @@ -12,8 +12,10 @@ - + + + diff --git a/src/vaadin-checkbox-group.html b/src/vaadin-checkbox-group.html new file mode 100644 index 0000000..d3df42c --- /dev/null +++ b/src/vaadin-checkbox-group.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + diff --git a/test/test-suites.js b/test/test-suites.js index 781288d..35a3fdd 100644 --- a/test/test-suites.js +++ b/test/test-suites.js @@ -1,4 +1,5 @@ window.VaadinCheckboxSuites = [ 'vaadin-checkbox_test.html', + 'vaadin-checkbox-group_test.html', 'accessibility.html' ]; diff --git a/test/vaadin-checkbox-group_test.html b/test/vaadin-checkbox-group_test.html new file mode 100644 index 0000000..db4c341 --- /dev/null +++ b/test/vaadin-checkbox-group_test.html @@ -0,0 +1,126 @@ + + + + + vaadin-checkbox-group tests + + + + + + + + + + + + + + + diff --git a/theme/lumo/vaadin-checkbox-group-styles.html b/theme/lumo/vaadin-checkbox-group-styles.html new file mode 100644 index 0000000..5611dee --- /dev/null +++ b/theme/lumo/vaadin-checkbox-group-styles.html @@ -0,0 +1,10 @@ + + + diff --git a/theme/lumo/vaadin-checkbox-group.html b/theme/lumo/vaadin-checkbox-group.html new file mode 100644 index 0000000..17c9632 --- /dev/null +++ b/theme/lumo/vaadin-checkbox-group.html @@ -0,0 +1,3 @@ + + + diff --git a/theme/material/vaadin-checkbox-group-styles.html b/theme/material/vaadin-checkbox-group-styles.html new file mode 100644 index 0000000..cce6679 --- /dev/null +++ b/theme/material/vaadin-checkbox-group-styles.html @@ -0,0 +1,10 @@ + + + diff --git a/theme/material/vaadin-checkbox-group.html b/theme/material/vaadin-checkbox-group.html new file mode 100644 index 0000000..01f114a --- /dev/null +++ b/theme/material/vaadin-checkbox-group.html @@ -0,0 +1,2 @@ + + diff --git a/vaadin-checkbox-group.html b/vaadin-checkbox-group.html new file mode 100644 index 0000000..0678bb7 --- /dev/null +++ b/vaadin-checkbox-group.html @@ -0,0 +1 @@ + diff --git a/wct.conf.js b/wct.conf.js index 5dc3bd1..df999c6 100644 --- a/wct.conf.js +++ b/wct.conf.js @@ -21,7 +21,7 @@ module.exports = { } }, // MAGI REMOVE END - + registerHooks: function(context) { const saucelabsPlatformsMobile = [ 'macOS 10.12/iphone@10.3',