File: src/elements/oreesh-checkbox/oreesh-checkbox.html
<script>
/**
Group of checkbox buttons
// Can be created dynamically
var checkbox = new OreeshCheckbox();
<!-- Or via HTML -->
<oreesh-checkbox>
<oreesh-checkbox-button label="1" value="0">Choose me</oreesh-checkbox-button>
<oreesh-checkbox-button label="2" value="1">Choose me, too!</oreesh-checkbox-button>
<oreesh-checkbox-button label="3" value="2" selected>I'm already selected</oreesh-checkbox-button>
<oreesh-checkbox-button label="4" value="3" disabled>I'm disabled</oreesh-checkbox-button>
</oreesh-checkbox>
@class oreesh-checkbox
**/
/**
The limit of available choices
@attribute limit
**/
/**
Whether to make the element disabled
@attribute disabled
**/
/**
An array containing the currently selcted values
@attribute value
**/
/**
The currently selcted oreesh-checkbox-button style `border: none;`
@attribute no-border
**/
/**
The currently selcted oreesh-checkbox-button style `border-color: transparent;`
@attribute no-border-color
**/
</script>
<dom-module id="oreesh-checkbox">
<template>
<iron-a11y-keys is="auto-binding" keys="left" on-keys-pressed="_pressLeft"></iron-a11y-keys>
<iron-a11y-keys is="auto-binding" keys="right" on-keys-pressed="_pressRight"></iron-a11y-keys>
<iron-a11y-keys is="auto-binding" keys="space enter" on-keys-pressed="_pressSelect"></iron-a11y-keys>
<content></content>
</template>
</dom-module>
<script src="./oreesh-checkbox.js"></script>