@material/switch
Advanced tools
Comparing version 15.0.0-canary.697fbdebd.0 to 15.0.0-canary.69ebf61ea.0
@@ -6,3 +6,3 @@ # Change Log | ||
# [15.0.0-canary.697fbdebd.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.697fbdebd.0) (2022-11-18) | ||
# [15.0.0-canary.69ebf61ea.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.69ebf61ea.0) (2023-04-27) | ||
@@ -9,0 +9,0 @@ |
@@ -79,3 +79,3 @@ /** | ||
setAriaChecked: function (ariaChecked) { | ||
return _this.root.setAttribute('aria-checked', ariaChecked); | ||
_this.root.setAttribute('aria-checked', ariaChecked); | ||
}, | ||
@@ -82,0 +82,0 @@ setDisabled: function (disabled) { |
@@ -27,2 +27,3 @@ /** | ||
import { MDCSwitchFoundation } from './foundation'; | ||
/** MDC Switch */ | ||
export declare class MDCSwitch extends MDCComponent<MDCSwitchFoundation> implements MDCRippleCapableSurface { | ||
@@ -29,0 +30,0 @@ static attachTo(root: HTMLElement): MDCSwitch; |
@@ -32,2 +32,3 @@ /** | ||
import { MDCSwitchFoundation } from './foundation'; | ||
/** MDC Switch */ | ||
var MDCSwitch = /** @class */ (function (_super) { | ||
@@ -66,7 +67,12 @@ __extends(MDCSwitch, _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); }, | ||
removeClass: function (className) { return _this.root.classList.remove(className); }, | ||
addClass: function (className) { | ||
_this.root.classList.add(className); | ||
}, | ||
removeClass: function (className) { | ||
_this.root.classList.remove(className); | ||
}, | ||
setNativeControlChecked: function (checked) { return _this.nativeControl.checked = | ||
@@ -113,5 +119,8 @@ checked; }, | ||
var rippleSurface = this.root.querySelector(RIPPLE_SURFACE_SELECTOR); | ||
// 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)), { addClass: function (className) { return rippleSurface.classList.add(className); }, computeBoundingRect: function () { return rippleSurface.getBoundingClientRect(); }, deregisterInteractionHandler: function (evtType, handler) { | ||
// 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)), { addClass: function (className) { | ||
rippleSurface.classList.add(className); | ||
}, computeBoundingRect: function () { return rippleSurface.getBoundingClientRect(); }, deregisterInteractionHandler: function (evtType, handler) { | ||
_this.nativeControl.removeEventListener(evtType, handler, applyPassive()); | ||
@@ -118,0 +127,0 @@ }, isSurfaceActive: function () { return matches(_this.nativeControl, ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (evtType, handler) { |
@@ -36,5 +36,7 @@ /** | ||
NATIVE_CONTROL_SELECTOR: string; | ||
/** A CSS selector used to locate the ripple surface element for the switch. */ | ||
/** | ||
* A CSS selector used to locate the ripple surface element for the switch. | ||
*/ | ||
RIPPLE_SURFACE_SELECTOR: string; | ||
}; | ||
export { cssClasses, strings }; |
@@ -36,3 +36,5 @@ /** | ||
NATIVE_CONTROL_SELECTOR: '.mdc-switch__native-control', | ||
/** A CSS selector used to locate the ripple surface element for the switch. */ | ||
/** | ||
* A CSS selector used to locate the ripple surface element for the switch. | ||
*/ | ||
RIPPLE_SURFACE_SELECTOR: '.mdc-switch__thumb-underlay', | ||
@@ -39,0 +41,0 @@ }; |
@@ -25,2 +25,3 @@ /** | ||
import { MDCSwitchAdapter } from './adapter'; | ||
/** MDC Switch Foundation */ | ||
export declare class MDCSwitchFoundation extends MDCFoundation<MDCSwitchAdapter> { | ||
@@ -27,0 +28,0 @@ /** The string constants used by the switch. */ |
@@ -26,2 +26,3 @@ /** | ||
import { cssClasses, strings } from './constants'; | ||
/** MDC Switch Foundation */ | ||
var MDCSwitchFoundation = /** @class */ (function (_super) { | ||
@@ -28,0 +29,0 @@ __extends(MDCSwitchFoundation, _super); |
{ | ||
"name": "@material/switch", | ||
"description": "The Material Components for the web switch component", | ||
"version": "15.0.0-canary.697fbdebd.0", | ||
"version": "15.0.0-canary.69ebf61ea.0", | ||
"license": "MIT", | ||
@@ -20,14 +20,14 @@ "keywords": [ | ||
"dependencies": { | ||
"@material/animation": "15.0.0-canary.697fbdebd.0", | ||
"@material/base": "15.0.0-canary.697fbdebd.0", | ||
"@material/density": "15.0.0-canary.697fbdebd.0", | ||
"@material/dom": "15.0.0-canary.697fbdebd.0", | ||
"@material/elevation": "15.0.0-canary.697fbdebd.0", | ||
"@material/feature-targeting": "15.0.0-canary.697fbdebd.0", | ||
"@material/focus-ring": "15.0.0-canary.697fbdebd.0", | ||
"@material/ripple": "15.0.0-canary.697fbdebd.0", | ||
"@material/rtl": "15.0.0-canary.697fbdebd.0", | ||
"@material/shape": "15.0.0-canary.697fbdebd.0", | ||
"@material/theme": "15.0.0-canary.697fbdebd.0", | ||
"@material/tokens": "15.0.0-canary.697fbdebd.0", | ||
"@material/animation": "15.0.0-canary.69ebf61ea.0", | ||
"@material/base": "15.0.0-canary.69ebf61ea.0", | ||
"@material/density": "15.0.0-canary.69ebf61ea.0", | ||
"@material/dom": "15.0.0-canary.69ebf61ea.0", | ||
"@material/elevation": "15.0.0-canary.69ebf61ea.0", | ||
"@material/feature-targeting": "15.0.0-canary.69ebf61ea.0", | ||
"@material/focus-ring": "15.0.0-canary.69ebf61ea.0", | ||
"@material/ripple": "15.0.0-canary.69ebf61ea.0", | ||
"@material/rtl": "15.0.0-canary.69ebf61ea.0", | ||
"@material/shape": "15.0.0-canary.69ebf61ea.0", | ||
"@material/theme": "15.0.0-canary.69ebf61ea.0", | ||
"@material/tokens": "15.0.0-canary.69ebf61ea.0", | ||
"safevalues": "^0.3.4", | ||
@@ -39,3 +39,3 @@ "tslib": "^2.1.0" | ||
}, | ||
"gitHead": "633705dd01d68334d80bad5e354eb7e71d9fa30b" | ||
"gitHead": "e68ad025642429a51f137e9f3fc853364faf0622" | ||
} |
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 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
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
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
1072006
8378
+ Added@material/animation@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/base@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/density@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/dom@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/elevation@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/feature-targeting@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/focus-ring@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/ripple@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/rtl@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/shape@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/theme@15.0.0-canary.69ebf61ea.0(transitive)
+ Added@material/tokens@15.0.0-canary.69ebf61ea.0(transitive)
- Removed@material/animation@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/base@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/density@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/dom@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/elevation@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/feature-targeting@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/focus-ring@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/ripple@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/rtl@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/shape@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/theme@15.0.0-canary.697fbdebd.0(transitive)
- Removed@material/tokens@15.0.0-canary.697fbdebd.0(transitive)
Updated@material/feature-targeting@15.0.0-canary.69ebf61ea.0