Socket
Socket
Sign inDemoInstall

ampersand-checkbox-view

Package Overview
Dependencies
11
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 2.0.0

LICENSE.md

14

ampersand-checkbox-view.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc