Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@3mo/checkbox-group

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@3mo/checkbox-group - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

5

dist/CheckboxGroup.d.ts

@@ -6,2 +6,4 @@ import { Checkbox } from '@3mo/checkbox';

*
* @ssr true
*
* @attr direction

@@ -14,6 +16,7 @@ */

private set childrenSelected(value);
protected changed: () => CheckboxSelection;
protected handleChanged(): void;
static get styles(): import("@a11d/lit").CSSResult;
protected get template(): import("lit-html").HTMLTemplateResult;
private readonly handleSlotChange;
private updateValue;
}

@@ -20,0 +23,0 @@ declare global {

28

dist/CheckboxGroup.js

@@ -7,2 +7,4 @@ import { __decorate } from "tslib";

*
* @ssr true
*
* @attr direction

@@ -14,14 +16,13 @@ */

this.direction = 'vertical';
this.changed = () => this.childrenSelected = this.selected;
this.handleSlotChange = () => {
const updateValue = () => {
const selected = this.childrenSelected;
if (selected !== this.selected) {
this.selected = selected;
this.change.dispatch(selected);
}
};
updateValue();
this.checkboxes.forEach(checkbox => checkbox.change.subscribe(updateValue));
this.updateValue();
this.checkboxes.forEach(checkbox => checkbox.change.subscribe(this.updateValue));
};
this.updateValue = () => {
const childrenSelected = this.childrenSelected;
if (childrenSelected !== this.selected) {
this.selected = childrenSelected;
this.change.dispatch(childrenSelected);
}
};
}

@@ -53,2 +54,7 @@ get checkboxes() {

}
handleChanged() {
// Whenever "selected" changes, wether by user interaction or by the children changing
// we need to update the childrenSelected state.
this.childrenSelected = this.selected;
}
static get styles() {

@@ -83,3 +89,3 @@ return css `

eventListener('change')
], CheckboxGroup.prototype, "changed", void 0);
], CheckboxGroup.prototype, "handleChanged", null);
CheckboxGroup = __decorate([

@@ -86,0 +92,0 @@ component('mo-checkbox-group')

{
"name": "@3mo/checkbox-group",
"version": "0.1.2",
"version": "0.1.3",
"description": "A checkbox-group web-component based on Material Web Components.",

@@ -5,0 +5,0 @@ "repository": {

# CheckboxGroup
A checkbox-group web-component based on Material Web Components.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc