ampersand-checkbox-view
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -6,8 +6,8 @@ var domify = require('domify'); | ||
// can be overwritten by anything with: | ||
// <input>, <label> and <the same `role` attributes | ||
// <input>, <label> and the same `data-hook` attributes | ||
var template = [ | ||
'<label class="checkbox">', | ||
'<input type="checkbox"><span role="label"></span>', | ||
'<div role="message-container" class="message message-below message-error">', | ||
'<p role="message-text"></p>', | ||
'<input type="checkbox"><span data-hook="label"></span>', | ||
'<div data-hook="message-container" class="message message-below message-error">', | ||
'<p data-hook="message-text"></p>', | ||
'</div>', | ||
@@ -63,5 +63,5 @@ '</label>' | ||
this.input = this.el.querySelector('input'); | ||
this.labelEl = this.el.querySelector('[role=label]'); | ||
this.messageContainer = this.el.querySelector('[role=message-container]'); | ||
this.messageEl = this.el.querySelector('[role=message-text]'); | ||
this.labelEl = this.el.querySelector('[data-hook~=label]'); | ||
this.messageContainer = this.el.querySelector('[data-hook~=message-container]'); | ||
this.messageEl = this.el.querySelector('[data-hook~=message-text]'); | ||
this.setMessage(this.message); | ||
@@ -68,0 +68,0 @@ this.input.checked = !!this.value; |
{ | ||
"name": "ampersand-checkbox-view", | ||
"description": "A view module for intelligently rendering and validating checkbox input. Works well with ampersand-form-view.", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -10,3 +10,3 @@ "bugs": { | ||
"dependencies": { | ||
"ampersand-dom": "^0.1.2", | ||
"ampersand-dom": "^1.2.1", | ||
"domify": "~1.2.2" | ||
@@ -13,0 +13,0 @@ }, |
@@ -35,5 +35,5 @@ # ampersand-checkbox-view | ||
// - an `<input>` element | ||
// - an element with a `role="label"` attribute | ||
// - an element with a `role="message-container"` attribute (this we'll show/hide) | ||
// - an elememt with a `role="message-text"` attribute (where message text goes for error) | ||
// - an element with a `data-hook="label"` attribute | ||
// - an element with a `data-hook="message-container"` attribute (this we'll show/hide) | ||
// - an elememt with a `data-hook="message-text"` attribute (where message text goes for error) | ||
template: // some HTML string | ||
@@ -40,0 +40,0 @@ // Label name |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11358
8
1
+ Addedampersand-dom@1.5.0(transitive)
+ Addedampersand-version@1.0.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedfind-root@0.1.2(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedreadable-stream@1.0.34(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedthrough2@0.6.5(transitive)
+ Addedxtend@4.0.2(transitive)
- Removedampersand-dom@0.1.2(transitive)
- Removeddeep-equal@0.2.2(transitive)
- Removeddefined@0.0.0(transitive)
- Removedglob@3.2.11(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedminimatch@0.3.0(transitive)
- Removedobject-inspect@0.4.0(transitive)
- Removedresumer@0.0.0(transitive)
- Removedsigmund@1.0.1(transitive)
- Removedtape@2.13.4(transitive)
- Removedthrough@2.3.8(transitive)
- Removedupdate@0.1.0(transitive)
Updatedampersand-dom@^1.2.1