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

@material/checkbox

Package Overview
Dependencies
Maintainers
14
Versions
1705
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/checkbox - npm Package Compare versions

Comparing version 15.0.0-canary.bb7751002.0 to 15.0.0-canary.bc9ae6c9c.0

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

# [15.0.0-canary.bb7751002.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.bb7751002.0) (2022-11-16)
# [15.0.0-canary.bc9ae6c9c.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.bc9ae6c9c.0) (2023-08-03)

@@ -9,0 +9,0 @@

@@ -27,5 +27,7 @@ /**

import { MDCCheckboxFoundation } from './foundation';
export declare type MDCCheckboxFactory = (el: Element, foundation?: MDCCheckboxFoundation) => MDCCheckbox;
/** MDC Checkbox Factory */
export declare type MDCCheckboxFactory = (el: HTMLElement, foundation?: MDCCheckboxFoundation) => MDCCheckbox;
/** MDC Checkbox */
export declare class MDCCheckbox extends MDCComponent<MDCCheckboxFoundation> implements MDCRippleCapableSurface {
static attachTo(root: Element): MDCCheckbox;
static attachTo(root: HTMLElement): MDCCheckbox;
get ripple(): MDCRipple;

@@ -32,0 +34,0 @@ get checked(): boolean;

@@ -33,2 +33,3 @@ /**

var CB_PROTO_PROPS = ['checked', 'indeterminate'];
/** MDC Checkbox */
var MDCCheckbox = /** @class */ (function (_super) {

@@ -119,6 +120,9 @@ __extends(MDCCheckbox, _super);

var _this = this;
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
// DO NOT INLINE this variable. For backward compatibility, foundations take
// a Partial<MDCFooAdapter>. To ensure we don't accidentally omit any
// methods, we need a separate, strongly typed adapter variable.
var adapter = {
addClass: function (className) { return _this.root.classList.add(className); },
addClass: function (className) {
_this.root.classList.add(className);
},
forceLayout: function () { return _this.root.offsetWidth; },

@@ -136,3 +140,3 @@ hasNativeControl: function () { return !!_this.getNativeControl(); },

setNativeControlAttr: function (attr, value) {
_this.getNativeControl().setAttribute(attr, value);
_this.safeSetAttribute(_this.getNativeControl(), attr, value);
},

@@ -147,4 +151,5 @@ setNativeControlDisabled: function (disabled) {

var _this = this;
// DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
// To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
// DO NOT INLINE this variable. For backward compatibility, foundations take
// a Partial<MDCFooAdapter>. To ensure we don't accidentally omit any
// methods, we need a separate, strongly typed adapter variable.
var adapter = __assign(__assign({}, MDCRipple.createAdapter(this)), { deregisterInteractionHandler: function (evtType, handler) {

@@ -164,8 +169,8 @@ _this.getNativeControl().removeEventListener(evtType, handler, applyPassive());

var desc = Object.getOwnPropertyDescriptor(cbProto, controlState);
// We have to check for this descriptor, since some browsers (Safari) don't support its return.
// See: https://bugs.webkit.org/show_bug.cgi?id=49739
// We have to check for this descriptor, since some browsers (Safari)
// don't support its return. See:
// https://bugs.webkit.org/show_bug.cgi?id=49739
if (!validDescriptor(desc)) {
return { value: void 0 };
}
// Type cast is needed for compatibility with Closure Compiler.
var nativeGetter = desc.get;

@@ -172,0 +177,0 @@ var nativeCbDesc = {

@@ -25,2 +25,3 @@ /**

import { MDCCheckboxAdapter } from './adapter';
/** MDC Checkbox Foundation */
export declare class MDCCheckboxFoundation extends MDCFoundation<MDCCheckboxAdapter> {

@@ -27,0 +28,0 @@ static get cssClasses(): {

@@ -26,2 +26,3 @@ /**

import { cssClasses, numbers, strings } from './constants';
/** MDC Checkbox Foundation */
var MDCCheckboxFoundation = /** @class */ (function (_super) {

@@ -131,4 +132,5 @@ __extends(MDCCheckboxFoundation, _super);

}
// Check to ensure that there isn't a previously existing animation class, in case for example
// the user interacted with the checkbox before the animation was finished.
// Check to ensure that there isn't a previously existing animation class,
// in case for example the user interacted with the checkbox before the
// animation was finished.
if (this.currentAnimationClass.length > 0) {

@@ -142,4 +144,4 @@ clearTimeout(this.animEndLatchTimer);

this.currentCheckState = newState;
// Check for parentNode so that animations are only run when the element is attached
// to the DOM.
// Check for parentNode so that animations are only run when the element is
// attached to the DOM.
if (this.adapter.isAttachedToDOM() &&

@@ -167,13 +169,22 @@ this.currentAnimationClass.length > 0) {

}
return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;
return newState === TRANSITION_STATE_CHECKED ?
ANIM_INDETERMINATE_CHECKED :
ANIM_INDETERMINATE_UNCHECKED;
case TRANSITION_STATE_UNCHECKED:
return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;
return newState === TRANSITION_STATE_CHECKED ?
ANIM_UNCHECKED_CHECKED :
ANIM_UNCHECKED_INDETERMINATE;
case TRANSITION_STATE_CHECKED:
return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;
return newState === TRANSITION_STATE_UNCHECKED ?
ANIM_CHECKED_UNCHECKED :
ANIM_CHECKED_INDETERMINATE;
default: // TRANSITION_STATE_INDETERMINATE
return newState === TRANSITION_STATE_CHECKED ? ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;
return newState === TRANSITION_STATE_CHECKED ?
ANIM_INDETERMINATE_CHECKED :
ANIM_INDETERMINATE_UNCHECKED;
}
};
MDCCheckboxFoundation.prototype.updateAriaChecked = function () {
// Ensure aria-checked is set to mixed if checkbox is in indeterminate state.
// Ensure aria-checked is set to mixed if checkbox is in indeterminate
// state.
if (this.adapter.isIndeterminate()) {

@@ -180,0 +191,0 @@ this.adapter.setNativeControlAttr(strings.ARIA_CHECKED_ATTR, strings.ARIA_CHECKED_INDETERMINATE_VALUE);

{
"name": "@material/checkbox",
"description": "The Material Components for the web checkbox component",
"version": "15.0.0-canary.bb7751002.0",
"version": "15.0.0-canary.bc9ae6c9c.0",
"license": "MIT",

@@ -20,14 +20,15 @@ "keywords": [

"dependencies": {
"@material/animation": "15.0.0-canary.bb7751002.0",
"@material/base": "15.0.0-canary.bb7751002.0",
"@material/density": "15.0.0-canary.bb7751002.0",
"@material/dom": "15.0.0-canary.bb7751002.0",
"@material/feature-targeting": "15.0.0-canary.bb7751002.0",
"@material/focus-ring": "15.0.0-canary.bb7751002.0",
"@material/ripple": "15.0.0-canary.bb7751002.0",
"@material/theme": "15.0.0-canary.bb7751002.0",
"@material/touch-target": "15.0.0-canary.bb7751002.0",
"@material/animation": "15.0.0-canary.bc9ae6c9c.0",
"@material/base": "15.0.0-canary.bc9ae6c9c.0",
"@material/density": "15.0.0-canary.bc9ae6c9c.0",
"@material/dom": "15.0.0-canary.bc9ae6c9c.0",
"@material/feature-targeting": "15.0.0-canary.bc9ae6c9c.0",
"@material/focus-ring": "15.0.0-canary.bc9ae6c9c.0",
"@material/ripple": "15.0.0-canary.bc9ae6c9c.0",
"@material/rtl": "15.0.0-canary.bc9ae6c9c.0",
"@material/theme": "15.0.0-canary.bc9ae6c9c.0",
"@material/touch-target": "15.0.0-canary.bc9ae6c9c.0",
"tslib": "^2.1.0"
},
"gitHead": "f83cadc3a1330a69930926dacdce7fdf10432f98"
"gitHead": "9f0b9b80c267d99daa258e635481fecc4cbf0acd"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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