New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cfpb/cfpb-expandables

Package Overview
Dependencies
Maintainers
11
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfpb/cfpb-expandables - npm Package Compare versions

Comparing version 0.20.1 to 0.21.0

src/Summary.js

10

package.json
{
"name": "@cfpb/cfpb-expandables",
"version": "0.20.1",
"version": "0.21.0",
"description": "Design System expandables",

@@ -12,5 +12,5 @@ "main": "src/cfpb-expandables.js",

"dependencies": {
"@cfpb/cfpb-atomic-component": "^0.20.1",
"@cfpb/cfpb-core": "^0.20.0",
"@cfpb/cfpb-icons": "^0.20.0"
"@cfpb/cfpb-atomic-component": "^0.21.0",
"@cfpb/cfpb-core": "^0.21.0",
"@cfpb/cfpb-icons": "^0.21.0"
},

@@ -20,4 +20,4 @@ "keywords": [

],
"gitHead": "32bd5d9b20a025e8bdbb0083106f31eb06f85ea6",
"gitHead": "905c9fa959cdf19f992fabfc0b3f5f64b315d67e",
"type": "module"
}

@@ -43,7 +43,7 @@ /* ==========================================================================

this.transition.addEventListener(
'expandBegin',
'expandbegin',
expandBeginHandler.bind(this)
);
this.transition.addEventListener(
'collapseEnd',
'collapseend',
collapseEndHandler.bind(this)

@@ -50,0 +50,0 @@ );

@@ -23,3 +23,3 @@ import BaseTransition from '@cfpb/cfpb-atomic-component/src/utilities/transition/BaseTransition.js';

function ExpandableTransition(element) {
const _baseTransition = new BaseTransition(element, CLASSES);
const _baseTransition = new BaseTransition(element, CLASSES, this);
let previousHeight;

@@ -32,3 +32,3 @@

if (element.classList.contains(CLASSES.EXPANDED)) {
this.dispatchEvent('expandEnd', { target: this });
this.dispatchEvent('expandend', { target: this });

@@ -39,3 +39,3 @@ if (element.scrollHeight > previousHeight) {

} else if (element.classList.contains(CLASSES.COLLAPSED)) {
this.dispatchEvent('collapseEnd', { target: this });
this.dispatchEvent('collapseend', { target: this });
}

@@ -48,4 +48,6 @@ }

function init() {
_baseTransition.init();
_baseTransition.addEventListener(
const openOnLoad = element.classList.contains(CLASSES.OPEN_DEFAULT);
const initialClass = openOnLoad ? CLASSES.EXPANDED : CLASSES.COLLAPSED;
_baseTransition.init(initialClass);
this.addEventListener(
BaseTransition.END_EVENT,

@@ -55,3 +57,3 @@ _transitionComplete.bind(this)

if (element.classList.contains(CLASSES.OPEN_DEFAULT)) {
if (openOnLoad) {
this.expand();

@@ -86,3 +88,3 @@ } else {

function collapse() {
this.dispatchEvent('collapseBegin', { target: this });
this.dispatchEvent('collapsebegin', { target: this });

@@ -102,3 +104,3 @@ previousHeight = element.scrollHeight;

function expand() {
this.dispatchEvent('expandBegin', { target: this });
this.dispatchEvent('expandbegin', { target: this });

@@ -105,0 +107,0 @@ if (!previousHeight || element.scrollHeight > previousHeight) {

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