Socket
Socket
Sign inDemoInstall

@lion/collapsible

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/collapsible - npm Package Compare versions

Comparing version 0.6.6 to 0.7.0

154

custom-elements.json
{
"schemaVersion": "0.1.0",
"schemaVersion": "1.0.0",
"readme": "",

@@ -7,3 +7,3 @@ "modules": [

"kind": "javascript-module",
"path": "./index.d.ts",
"path": "index.d.ts",
"declarations": [],

@@ -23,3 +23,3 @@ "exports": [

"kind": "javascript-module",
"path": "./index.js",
"path": "index.js",
"declarations": [],

@@ -39,3 +39,3 @@ "exports": [

"kind": "javascript-module",
"path": "./lion-collapsible.d.ts",
"path": "lion-collapsible.d.ts",
"declarations": [],

@@ -46,3 +46,3 @@ "exports": []

"kind": "javascript-module",
"path": "./lion-collapsible.js",
"path": "lion-collapsible.js",
"declarations": [],

@@ -55,3 +55,3 @@ "exports": [

"name": "LionCollapsible",
"module": "./src/LionCollapsible.d.ts"
"module": "/src/LionCollapsible.js"
}

@@ -63,11 +63,8 @@ }

"kind": "javascript-module",
"path": "./src/LionCollapsible.d.ts",
"path": "src/LionCollapsible.d.ts",
"declarations": [
{
"kind": "class",
"description": "`LionCollapsible` is a class for custom collapsible element (`<lion-collapsible>` web component).",
"name": "LionCollapsible",
"superclass": {
"name": "LitElement",
"module": "./src/LionCollapsible.d.ts"
},
"members": [

@@ -77,3 +74,2 @@ {

"name": "opened",
"privacy": "public",
"type": {

@@ -85,5 +81,4 @@ "text": "boolean"

"kind": "method",
"name": "show",
"name": "toggle",
"privacy": "public",
"description": "Show extra content.",
"return": {

@@ -93,9 +88,9 @@ "type": {

}
}
},
"description": "Toggle the current(opened/closed) state."
},
{
"kind": "method",
"name": "hide",
"name": "show",
"privacy": "public",
"description": "Hide extra content.",
"return": {

@@ -105,9 +100,9 @@ "type": {

}
}
},
"description": "Show extra content."
},
{
"kind": "method",
"name": "toggle",
"name": "hide",
"privacy": "public",
"description": "Toggle the current(opened/closed) state.",
"return": {

@@ -117,3 +112,4 @@ "type": {

}
}
},
"description": "Hide extra content."
},

@@ -124,3 +120,2 @@ {

"privacy": "protected",
"description": "Show animation implementation in sub-classer.",
"return": {

@@ -138,3 +133,4 @@ "type": {

}
]
],
"description": "Show animation implementation in sub-classer."
},

@@ -145,3 +141,2 @@ {

"privacy": "protected",
"description": "Hide animation implementation in sub-classer.",
"return": {

@@ -159,3 +154,4 @@ "type": {

}
]
],
"description": "Hide animation implementation in sub-classer."
},

@@ -165,6 +161,6 @@ {

"name": "_invokerNode",
"privacy": "protected",
"type": {
"text": "HTMLElement | undefined"
}
},
"privacy": "protected"
},

@@ -174,6 +170,6 @@ {

"name": "_contentNode",
"privacy": "protected",
"type": {
"text": "HTMLElement | undefined"
}
},
"privacy": "protected"
},

@@ -183,6 +179,6 @@ {

"name": "_contentHeight",
"privacy": "protected",
"type": {
"text": "string"
}
},
"privacy": "protected"
},

@@ -192,3 +188,4 @@ {

"name": "__openedChanged",
"privacy": "private"
"privacy": "private",
"description": "Update content slot size and fire `opened-changed` event"
},

@@ -198,3 +195,4 @@ {

"name": "__updateContentSize",
"privacy": "private"
"privacy": "private",
"description": "Toggle extra content visibility on state change."
},

@@ -204,5 +202,12 @@ {

"name": "__setDefaultState",
"privacy": "private"
"privacy": "private",
"description": "Set default state for content based on `opened` attr"
}
]
],
"superclass": {
"name": "LitElement",
"package": "@lion/core"
},
"tagName": "lion-collapsible",
"customElement": true
}

@@ -216,3 +221,3 @@ ],

"name": "LionCollapsible",
"module": "./src/LionCollapsible.d.ts"
"module": "src/LionCollapsible.d.ts"
}

@@ -224,19 +229,8 @@ }

"kind": "javascript-module",
"path": "./src/LionCollapsible.js",
"path": "src/LionCollapsible.js",
"declarations": [
{
"kind": "class",
"description": "`LionCollapsible` is a class for custom collapsible element (`<lion-collapsible>` web component).",
"name": "LionCollapsible",
"events": [
{
"name": "opened-changed",
"type": {
"text": "CustomEvent"
}
}
],
"superclass": {
"name": "LitElement",
"package": "@lion/core"
},
"members": [

@@ -246,4 +240,4 @@ {

"name": "show",
"privacy": "public",
"description": "Show extra content."
"description": "Show extra content.",
"privacy": "public"
},

@@ -253,4 +247,4 @@ {

"name": "hide",
"privacy": "public",
"description": "Hide extra content."
"description": "Hide extra content.",
"privacy": "public"
},

@@ -260,4 +254,4 @@ {

"name": "toggle",
"privacy": "public",
"description": "Toggle the current(opened/closed) state."
"description": "Toggle the current(opened/closed) state.",
"privacy": "public"
},

@@ -267,4 +261,2 @@ {

"name": "_showAnimation",
"privacy": "protected",
"description": "Show animation implementation in sub-classer.",
"parameters": [

@@ -277,3 +269,5 @@ {

}
]
],
"description": "Show animation implementation in sub-classer.",
"privacy": "protected"
},

@@ -283,4 +277,2 @@ {

"name": "_hideAnimation",
"privacy": "protected",
"description": "Hide animation implementation in sub-classer.",
"parameters": [

@@ -293,3 +285,5 @@ {

}
]
],
"description": "Hide animation implementation in sub-classer.",
"privacy": "protected"
},

@@ -314,4 +308,4 @@ {

"name": "__openedChanged",
"privacy": "private",
"description": "Update content slot size and fire `opened-changed` event"
"description": "Update content slot size and fire `opened-changed` event",
"privacy": "private"
},

@@ -321,4 +315,4 @@ {

"name": "__updateContentSize",
"privacy": "private",
"description": "Toggle extra content visibility on state change."
"description": "Toggle extra content visibility on state change.",
"privacy": "private"
},

@@ -328,4 +322,4 @@ {

"name": "__setDefaultState",
"privacy": "private",
"description": "Set default state for content based on `opened` attr"
"description": "Set default state for content based on `opened` attr",
"privacy": "private"
},

@@ -335,6 +329,19 @@ {

"name": "opened",
"type": {
"text": "boolean"
},
"default": "false",
"privacy": "public",
"default": "false"
"attribute": "opened",
"reflects": true
}
],
"events": [
{
"name": "opened-changed",
"type": {
"text": "CustomEvent"
}
}
],
"attributes": [

@@ -346,3 +353,8 @@ {

],
"tagName": "lion-collapsible"
"superclass": {
"name": "LitElement",
"package": "@lion/core"
},
"tagName": "lion-collapsible",
"customElement": true
}

@@ -356,3 +368,3 @@ ],

"name": "LionCollapsible",
"module": "./src/LionCollapsible.js"
"module": "src/LionCollapsible.js"
}

@@ -364,3 +376,3 @@ }

"kind": "javascript-module",
"path": "./test/lion-collapsible.test.d.ts",
"path": "test/lion-collapsible.test.d.ts",
"declarations": [],

@@ -367,0 +379,0 @@ "exports": []

@@ -25,3 +25,3 @@ # Content >> Collapsible >> Overview ||10

- Use `opened` attribute or `toggle()` method to render default open.
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/745c809ce06b2dce0ee4e47749ce2b5ca23bd769/docs/components/interaction/button/overview.md) or native `button` with custom styling.
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/7c52c12bfb025c98f93b5f0be984cedd3028a20a/docs/components/interaction/button/overview.md) or native `button` with custom styling.
- Observe the state with the help of `@opened-changed` event.

@@ -28,0 +28,0 @@ - `show()` and `hide()` are helper methods to hide or show the content from outside.

{
"name": "@lion/collapsible",
"version": "0.6.6",
"version": "0.7.0",
"description": "This component is a combination of a button (the invoker), a chunk of extra content.",

@@ -41,3 +41,3 @@ "license": "MIT",

"dependencies": {
"@lion/core": "0.20.0"
"@lion/core": "^0.21.0"
},

@@ -58,4 +58,3 @@ "keywords": [

"./docs/*": "./docs/*"
},
"customElementsManifest": "custom-elements.json"
}
}

@@ -25,3 +25,3 @@ # Content >> Collapsible >> Overview ||10

- Use `opened` attribute or `toggle()` method to render default open.
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/745c809ce06b2dce0ee4e47749ce2b5ca23bd769/docs/components/interaction/button/overview.md) or native `button` with custom styling.
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/7c52c12bfb025c98f93b5f0be984cedd3028a20a/docs/components/interaction/button/overview.md) or native `button` with custom styling.
- Observe the state with the help of `@opened-changed` event.

@@ -28,0 +28,0 @@ - `show()` and `hide()` are helper methods to hide or show the content from outside.

@@ -17,2 +17,7 @@ /**

/**
* Toggle the current(opened/closed) state.
* @public
*/
public toggle(): void;
/**
* Show extra content.

@@ -28,7 +33,2 @@ * @public

/**
* Toggle the current(opened/closed) state.
* @public
*/
public toggle(): void;
/**
* Show animation implementation in sub-classer.

@@ -35,0 +35,0 @@ * @param {Object} opts

@@ -46,2 +46,3 @@ import { LitElement, html, css } from '@lion/core';

this.opened = false;
this.toggle = this.toggle.bind(this);
}

@@ -55,3 +56,3 @@

if (this._invokerNode) {
this._invokerNode.addEventListener('click', this.toggle.bind(this));
this._invokerNode.addEventListener('click', this.toggle);
this._invokerNode.setAttribute('aria-expanded', `${this.opened}`);

@@ -58,0 +59,0 @@ this._invokerNode.setAttribute('id', `collapsible-invoker-${uid}`);

@@ -1,6 +0,2 @@

export type LionCollapsible = import("../src/LionCollapsible").LionCollapsible;
export type TemplateResult = {
_$litType$: 1 | 2;
strings: TemplateStringsArray;
values: unknown[];
};
export type LionCollapsible = import('../src/LionCollapsible').LionCollapsible;
export type TemplateResult = import('@lion/core').TemplateResult;
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