Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: lib/paper_checkbox.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/paper_card.dart ('k') | lib/paper_checkbox.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/paper_checkbox.dart
diff --git a/lib/paper_checkbox.dart b/lib/paper_checkbox.dart
index 3d81da87c34f1e8e96be1eb98a67bcb38a61e4a1..1b223ff79528013ae70d0b85096fbc120a7ddf6d 100644
--- a/lib/paper_checkbox.dart
+++ b/lib/paper_checkbox.dart
@@ -8,10 +8,12 @@ import 'dart:html';
import 'dart:js' show JsArray, JsObject;
import 'package:web_components/web_components.dart';
import 'package:polymer_interop/polymer_interop.dart';
+import 'paper_checked_element_behavior.dart';
import 'paper_inky_focus_behavior.dart';
import 'iron_button_state.dart';
import 'iron_a11y_keys_behavior.dart';
import 'iron_control_state.dart';
+import 'paper_ripple_behavior.dart';
import 'iron_checked_element_behavior.dart';
import 'iron_form_element_behavior.dart';
import 'iron_validatable_behavior.dart';
@@ -19,6 +21,8 @@ import 'paper_ripple.dart';
import 'default_theme.dart';
import 'color.dart';
+/// Material design: [Checkbox](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox)
+///
/// `paper-checkbox` is a button that can be either checked or unchecked. User
/// can tap the checkbox to check or uncheck it. Usually you use checkboxes
/// to allow user to select multiple options from a set. If you have a single
@@ -44,22 +48,14 @@ import 'color.dart';
/// `--paper-checkbox-checked-ink-color` | Selected/focus ripple color when the input is checked | `--default-primary-color`
/// `--paper-checkbox-checkmark-color` | Checkmark color | `white`
/// `--paper-checkbox-label-color` | Label color | `--primary-text-color`
+/// `--paper-checkbox-label-spacing` | Spacing between the label and the checkbox | `8px`
/// `--paper-checkbox-error-color` | Checkbox color when invalid | `--google-red-500`
@CustomElementProxy('paper-checkbox')
-class PaperCheckbox extends HtmlElement with CustomElementProxyMixin, PolymerBase, IronA11yKeysBehavior, IronButtonState, IronControlState, PaperInkyFocusBehavior, IronFormElementBehavior, IronValidatableBehavior, IronCheckedElementBehavior {
+class PaperCheckbox extends HtmlElement with CustomElementProxyMixin, PolymerBase, IronA11yKeysBehavior, IronButtonState, IronControlState, PaperRippleBehavior, PaperInkyFocusBehavior, IronFormElementBehavior, IronValidatableBehavior, IronCheckedElementBehavior, PaperCheckedElementBehavior {
PaperCheckbox.created() : super.created();
factory PaperCheckbox() => new Element.tag('paper-checkbox');
/// Fired when the checked state changes.
String get ariaActiveAttribute => jsElement[r'ariaActiveAttribute'];
set ariaActiveAttribute(String value) { jsElement[r'ariaActiveAttribute'] = value; }
-
- /// Update the checkbox aria-label. This is a temporary workaround not
- /// being able to observe changes in <content>
- /// (see: https://github.com/Polymer/polymer/issues/1773)
- ///
- /// Call this if you manually change the contents of the checkbox
- /// and want the aria-label to match the new contents.
- updateAriaLabel() =>
- jsElement.callMethod('updateAriaLabel', []);
}
« no previous file with comments | « lib/paper_card.dart ('k') | lib/paper_checkbox.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698